| Package | Description |
|---|---|
| java.io |
Provides for system input and output through data streams, serialization and the file system.
|
| java.lang |
Provides classes that are fundamental to the design of the Java programming language.
|
| java.nio.charset |
Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters.
|
| java.nio.charset.spi |
Service-provider classes for the
java.nio.charset package.
|
| java.nio.file |
Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.
|
| java.util.zip |
Provides classes for reading and writing the standard ZIP and GZIP file formats.
|
| javax.tools |
Provides interfaces for tools which can be invoked from a program, for example, compilers.
|
| Constructor and Description | |
|---|---|
InputStreamReader(InputStream
Creates an InputStreamReader that uses the given charset.
|
|
OutputStreamWriter(OutputStream
Creates an OutputStreamWriter that uses the given charset.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
String.getBytes(Charset
Encodes this
String into a sequence of bytes using the given
charset, storing the result into a new byte array.
|
| Constructor and Description | |
|---|---|
String(byte[] bytes, Charset
Constructs a new
String by decoding the specified array of bytes using the specified
charset.
|
|
String(byte[] bytes, int offset, int length, Charset
Constructs a new
String by decoding the specified subarray of bytes using the specified
charset.
|
| Modifier and Type | Field and Description |
|---|---|
static Charset |
StandardCharsets.ISO_8859_1
ISO Latin Alphabet No.
|
static Charset |
StandardCharsets.US_ASCII
Seven-bit ASCII, a.k.a.
|
static Charset |
StandardCharsets.UTF_16
Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark
|
static Charset |
StandardCharsets.UTF_16BE
Sixteen-bit UCS Transformation Format, big-endian byte order
|
static Charset |
StandardCharsets.UTF_16LE
Sixteen-bit UCS Transformation Format, little-endian byte order
|
static Charset |
StandardCharsets.UTF_8
Eight-bit UCS Transformation Format
|
| Modifier and Type | Method and Description |
|---|---|
Charset |
CharsetEncoder.charset()
Returns the charset that created this encoder.
|
Charset |
CharsetDecoder.charset()
Returns the charset that created this decoder.
|
static Charset |
Charset.defaultCharset()
Returns the default charset of this Java virtual machine.
|
Charset |
CharsetDecoder.detectedCharset()
Retrieves the charset that was detected by this decoder
(optional operation).
|
static Charset |
Charset.forName(String
Returns a charset object for the named charset.
|
| Modifier and Type | Method and Description |
|---|---|
static SortedMap |
Charset.availableCharsets()
Constructs a sorted map from canonical charset names to charset objects.
|
| Modifier and Type | Method and Description |
|---|---|
int |
Charset.compareTo(Charset
Compares this charset to another.
|
abstract boolean |
Charset.contains(Charset
Tells whether or not this charset contains the given charset.
|
| Constructor and Description | |
|---|---|
CharsetDecoder(Charset
Initializes a new decoder.
|
|
CharsetEncoder(Charset
Initializes a new encoder.
|
|
CharsetEncoder(Charset
Initializes a new encoder.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Charset |
CharsetProvider.charsetForName(String
Retrieves a charset for the given charset name.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Iterator |
CharsetProvider.charsets()
Creates an iterator that iterates over the charsets supported by this provider.
|
| Modifier and Type | Method and Description |
|---|---|
static Stream |
Files.lines(Path
Read all lines from a file as a
Stream.
|
static BufferedReader |
Files.newBufferedReader(Path
Opens a file for reading, returning a
BufferedReader that may be used to read text from the file in an efficient manner.
|
static BufferedWriter |
Files.newBufferedWriter(Path
Opens or creates a file for writing, returning a
BufferedWriter that may be used to write text to the file in an efficient manner.
|
static List |
Files.readAllLines(Path
Read all lines from a file.
|
static Path |
Files.write(Path
Write lines of text to a file.
|
| Constructor and Description | |
|---|---|
ZipFile(File
Opens a ZIP file for reading given the specified File object.
|
|
ZipFile(File
Opens a new
ZipFile to read from the specified
File object in the specified mode.
|
|
ZipFile(String
Opens a zip file for reading.
|
|
ZipInputStream(InputStream
Creates a new ZIP input stream.
|
|
ZipOutputStream(OutputStream
Creates a new ZIP output stream.
|
| Modifier and Type | Method and Description |
|---|---|
StandardJavaFileManager |
DocumentationTool.getStandardFileManager(DiagnosticListener
Gets a new instance of the standard file manager implementation for this tool.
|
StandardJavaFileManager |
JavaCompiler.getStandardFileManager(DiagnosticListener
Gets a new instance of the standard file manager implementation for this tool.
|