| Modifier and Type | Class and Description |
|---|---|
| private static class | ZipEncodingHelper.SimpleEncodingHolder
A class, which holds the high characters of a simple encoding and lazily instantiates a Simple8BitZipEncoding instance in a thread-safe manner. |
| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | HEX_DIGITS
The hexadecimal digits |
| private static final Map | |
| pack-priv static final String | UTF8
name of the encoding UTF-8 |
| pack-priv static final ZipEncoding | UTF8_ZIP_ENCODING
name of the encoding UTF-8 |
| private static final String | UTF_DASH_8
variant name of the encoding UTF-8 used for comparisons. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | appendSurrogate(final ByteBuffer
The byte buffer to write to. bb, final char The character to write. c)Append |
| public static ZipEncoding | Returns: A zip encoding for the given encoding name.The name of the zip encoding. Specify name)null for
the platform's default encoding.Instantiates a zip encoding. |
| pack-priv static ByteBuffer | Returns: A byte bufferr with
r.capacity() = max(b.capacity() * 2,newCapacity) and
all the data contained in b copied to the beginning
of r.The original buffer. b, final int The minimal requested new capacity. newCapacity)Grow a byte buffer, so it has a minimal capacity or at least the double capacity of the original buffer |
| pack-priv static boolean | |
| pack-priv static void |
| HEX_DIGITS | back to summary |
|---|---|
| private static final byte[] HEX_DIGITS The hexadecimal digits | |
| simpleEncodings | back to summary |
|---|---|
| private static final Map<String, ZipEncodingHelper. | |
| UTF8 | back to summary |
|---|---|
| pack-priv static final String UTF8 name of the encoding UTF-8 | |
| UTF8_ZIP_ENCODING | back to summary |
|---|---|
| pack-priv static final ZipEncoding UTF8_ZIP_ENCODING name of the encoding UTF-8 | |
| UTF_DASH_8 | back to summary |
|---|---|
| private static final String UTF_DASH_8 variant name of the encoding UTF-8 used for comparisons. | |
| ZipEncodingHelper | back to summary |
|---|---|
| public ZipEncodingHelper() | |
| appendSurrogate | back to summary |
|---|---|
| pack-priv static void appendSurrogate(final ByteBuffer bb, final char c) Append
| |
| getZipEncoding | back to summary |
|---|---|
| public static ZipEncoding getZipEncoding(final String name) Instantiates a zip encoding.
| |
| growBuffer | back to summary |
|---|---|
| pack-priv static ByteBuffer growBuffer(final ByteBuffer b, final int newCapacity) Grow a byte buffer, so it has a minimal capacity or at least the double capacity of the original buffer
| |
| isUTF8 | back to summary |
|---|---|
| pack-priv static boolean isUTF8(String encoding) Whether a given encoding - or the platform's default encoding if the parameter is null - is UTF-8. | |
| prepareBufferForRead | back to summary |
|---|---|
| pack-priv static void prepareBufferForRead(final Buffer b) Prepares a buffer to be read after writing.
| |
| Modifier and Type | Field and Description |
|---|---|
| private Simple8BitZipEncoding | |
| private final char[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | SimpleEncodingHolder(final char[]
The characters for byte codes 128 to 255. highChars)Instantiate a simple encoding holder. |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized Simple8BitZipEncoding | Returns: The associatedSimple8BitZipEncoding, which
is instantiated if not done so far.
|
| encoding | back to summary |
|---|---|
| private Simple8BitZipEncoding encoding | |
| highChars | back to summary |
|---|---|
| private final char[] highChars | |
| SimpleEncodingHolder | back to summary |
|---|---|
| pack-priv SimpleEncodingHolder(final char[] highChars) Instantiate a simple encoding holder.
| |
| getEncoding | back to summary |
|---|---|
public synchronized Simple8BitZipEncoding getEncoding()
| |