| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static final int | Returns: number of bytes written to the output arrayscalar to convert unicodeScalar, byte[] user output array to fill with UTF8 bytes outputBytes, int first array element to fill offset, int maximum number of array elements to fill maxLength)this helper converts the unicodeScalar to a sequence of utf8 bytes and copies those bytes into the supplied outputBytes array. |
| public static final int | |
| public static final int | |
| public static final byte | |
| public static final byte | |
| public static final byte | |
| public static final byte | |
| public static final byte | |
| public static final byte | |
| public static final byte | |
| public static final byte | |
| public static final byte | |
| public static final int | |
| public static final int | Returns: Unicode scalarUTF8 bytes in an array bytes, int initial array element to decode from offset, int maximum number of bytes to consume from the array maxLength)this helper converts the bytes starting at offset from UTF8 to a Unicode scalar. |
| public static final int | Returns: number of bytes needed to decode the next scalarUTF8 bytes in user supplied array bytes, int first array element to read from offset, int maximum number of bytes to read from the array maxLength)this helper calculates the number of bytes it will consume from the supplied byte array (bytes) if getScalarFromBytes is called with the same parameters. |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final char | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final boolean | |
| public static final char | |
| public static final boolean | |
| public static final int | packBytesAfter1(int unicodeScalar, int utf8Len)
converts a unicode code point to a 0-3 bytes of UTF8 encoded data and a length - note this doesn't pack a 1 byte character and it returns the start character. |
| public static final int | |
| public static final char |
| HIGH_SURROGATE | back to summary |
|---|---|
| private static final int HIGH_SURROGATE | |
| LOW_SURROGATE | back to summary |
|---|---|
| private static final int LOW_SURROGATE | |
| MAXIMUM_UTF16_1_CHAR_CODE_POINT | back to summary |
|---|---|
| private static final int MAXIMUM_UTF16_1_CHAR_CODE_POINT | |
| SURROGATE_MASK | back to summary |
|---|---|
| private static final int SURROGATE_MASK | |
| SURROGATE_OFFSET | back to summary |
|---|---|
| private static final int SURROGATE_OFFSET | |
| UNICODE_CONTINUATION_BYTE_HEADER | back to summary |
|---|---|
| private static final int UNICODE_CONTINUATION_BYTE_HEADER | |
| UNICODE_CONTINUATION_BYTE_MASK | back to summary |
|---|---|
| private static final int UNICODE_CONTINUATION_BYTE_MASK | |
| UNICODE_FOUR_BYTE_HEADER | back to summary |
|---|---|
| private static final int UNICODE_FOUR_BYTE_HEADER | |
| UNICODE_FOUR_BYTE_MASK | back to summary |
|---|---|
| private static final int UNICODE_FOUR_BYTE_MASK | |
| UNICODE_MAX_FOUR_BYTE_SCALAR | back to summary |
|---|---|
| private static final int UNICODE_MAX_FOUR_BYTE_SCALAR | |
| UNICODE_MAX_ONE_BYTE_SCALAR | back to summary |
|---|---|
| private static final int UNICODE_MAX_ONE_BYTE_SCALAR | |
| UNICODE_MAX_THREE_BYTE_SCALAR | back to summary |
|---|---|
| private static final int UNICODE_MAX_THREE_BYTE_SCALAR | |
| UNICODE_MAX_TWO_BYTE_SCALAR | back to summary |
|---|---|
| private static final int UNICODE_MAX_TWO_BYTE_SCALAR | |
| UNICODE_THREE_BYTE_HEADER | back to summary |
|---|---|
| private static final int UNICODE_THREE_BYTE_HEADER | |
| UNICODE_THREE_BYTE_MASK | back to summary |
|---|---|
| private static final int UNICODE_THREE_BYTE_MASK | |
| UNICODE_THREE_BYTES_OR_FEWER_MASK | back to summary |
|---|---|
| private static final int UNICODE_THREE_BYTES_OR_FEWER_MASK | |
| UNICODE_TWO_BYTE_HEADER | back to summary |
|---|---|
| private static final int UNICODE_TWO_BYTE_HEADER | |
| UNICODE_TWO_BYTE_MASK | back to summary |
|---|---|
| private static final int UNICODE_TWO_BYTE_MASK | |
| IonUTF8 | back to summary |
|---|---|
| pack-priv IonUTF8() | |
| convertToUTF8Bytes | back to summary |
|---|---|
| public static final int convertToUTF8Bytes(int unicodeScalar, byte[] outputBytes, int offset, int maxLength) this helper converts the unicodeScalar to a sequence of utf8 bytes and copies those bytes into the supplied outputBytes array. If there is insufficient room in the array to hold the generated bytes it will throw an ArrayIndexOutOfBoundsException. It does not check for the validity of the passed in unicodeScalar thoroughly, however it will throw an InvalidUnicodeCodePoint if the value is less than negative or the UTF8 encoding would exceed 4 bytes.
| |
| fourByteScalar | back to summary |
|---|---|
| public static final int fourByteScalar(int b1, int b2, int b3, int b4) | |
| getAs4BytesReversed | back to summary |
|---|---|
| public static final int getAs4BytesReversed(int unicodeScalar) | |
| getByte1Of2 | back to summary |
|---|---|
| public static final byte getByte1Of2(int unicodeScalar) | |
| getByte1Of3 | back to summary |
|---|---|
| public static final byte getByte1Of3(int unicodeScalar) | |
| getByte1Of4 | back to summary |
|---|---|
| public static final byte getByte1Of4(int unicodeScalar) | |
| getByte2Of2 | back to summary |
|---|---|
| public static final byte getByte2Of2(int unicodeScalar) | |
| getByte2Of3 | back to summary |
|---|---|
| public static final byte getByte2Of3(int unicodeScalar) | |
| getByte2Of4 | back to summary |
|---|---|
| public static final byte getByte2Of4(int unicodeScalar) | |
| getByte3Of3 | back to summary |
|---|---|
| public static final byte getByte3Of3(int unicodeScalar) | |
| getByte3Of4 | back to summary |
|---|---|
| public static final byte getByte3Of4(int unicodeScalar) | |
| getByte4Of4 | back to summary |
|---|---|
| public static final byte getByte4Of4(int unicodeScalar) | |
| getScalarFrom4BytesReversed | back to summary |
|---|---|
| public static final int getScalarFrom4BytesReversed(int utf8BytesReversed) | |
| getScalarFromBytes | back to summary |
|---|---|
| public static final int getScalarFromBytes(byte[] bytes, int offset, int maxLength) this helper converts the bytes starting at offset from UTF8 to a Unicode scalar. This does not check for valid Unicode scalar ranges but simply handle the UTF8 decoding. getScalarReadLengthFromBytes can be used to determine how many bytes would be converted (consumed) in this process if the same parameters are passed in. This will throw ArrayIndexOutOfBoundsException if the array has too few bytes to fully decode the scalar. It will throw InvalidUnicodeCodePoint if the first byte isn't a valid UTF8 initial byte with a length of 4 or less.
| |
| getScalarReadLengthFromBytes | back to summary |
|---|---|
| public static final int getScalarReadLengthFromBytes(byte[] bytes, int offset, int maxLength) this helper calculates the number of bytes it will consume from the supplied byte array (bytes) if getScalarFromBytes is called with the same parameters. This is in place of having getScalarFromBytes return an object with the bytes consumed and the resultant scalar. This will throw ArrayIndexOutOfBoundsException if there are fewer bytes remaining (maxLength) than needed for a valid UTF8 sequence starting at offset.
| |
| getUnicodeScalarFromSurrogates | back to summary |
|---|---|
| public static final int getUnicodeScalarFromSurrogates(int highSurrogate, int lowSurrogate) | |
| getUTF8ByteCount | back to summary |
|---|---|
| public static final int getUTF8ByteCount(int unicodeScalar) | |
| getUTF8LengthFromFirstByte | back to summary |
|---|---|
| public static final int getUTF8LengthFromFirstByte(int firstByte) | |
| highSurrogate | back to summary |
|---|---|
| public static final char highSurrogate(int unicodeScalar) | |
| isContinueByteUTF8 | back to summary |
|---|---|
| public static final boolean isContinueByteUTF8(int b) | |
| isFourByteScalar | back to summary |
|---|---|
| public static final boolean isFourByteScalar(int unicodeScalar) | |
| isFourByteUTF8 | back to summary |
|---|---|
| public static final boolean isFourByteUTF8(int b) | |
| isHighSurrogate | back to summary |
|---|---|
| public static final boolean isHighSurrogate(int b) | |
| isLowSurrogate | back to summary |
|---|---|
| public static final boolean isLowSurrogate(int b) | |
| isOneByteScalar | back to summary |
|---|---|
| public static final boolean isOneByteScalar(int unicodeScalar) | |
| isOneByteUTF8 | back to summary |
|---|---|
| public static final boolean isOneByteUTF8(int b) | |
| isStartByte | back to summary |
|---|---|
| public static final boolean isStartByte(int b) | |
| isSurrogate | back to summary |
|---|---|
| public static final boolean isSurrogate(int b) | |
| isThreeByteScalar | back to summary |
|---|---|
| public static final boolean isThreeByteScalar(int unicodeScalar) | |
| isThreeByteUTF8 | back to summary |
|---|---|
| public static final boolean isThreeByteUTF8(int b) | |
| isTwoByteScalar | back to summary |
|---|---|
| public static final boolean isTwoByteScalar(int unicodeScalar) | |
| isTwoByteUTF8 | back to summary |
|---|---|
| public static final boolean isTwoByteUTF8(int b) | |
| lowSurrogate | back to summary |
|---|---|
| public static final char lowSurrogate(int unicodeScalar) | |
| needsSurrogateEncoding | back to summary |
|---|---|
| public static final boolean needsSurrogateEncoding(int unicodeScalar) | |
| packBytesAfter1 | back to summary |
|---|---|
| public static final int packBytesAfter1(int unicodeScalar, int utf8Len) converts a unicode code point to a 0-3 bytes of UTF8 encoded data and a length - note this doesn't pack a 1 byte character and it returns the start character. this is the unpacking routine while (_utf8_pretch_byte_count > 0 && offset < limit) { _utf8_pretch_byte_count--; buffer[offset++] = (byte)((_utf8_pretch_bytes >> (_utf8_pretch_byte_count*8)) & 0xff); } | |
| threeByteScalar | back to summary |
|---|---|
| public static final int threeByteScalar(int b1, int b2, int b3) | |
| twoByteScalar | back to summary |
|---|---|
| public static final char twoByteScalar(int b1, int b2) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| InvalidUnicodeCodePoint | back to summary |
|---|---|
| public InvalidUnicodeCodePoint() | |
| InvalidUnicodeCodePoint | back to summary |
|---|---|
| public InvalidUnicodeCodePoint(String msg) | |
| InvalidUnicodeCodePoint | back to summary |
|---|---|
| public InvalidUnicodeCodePoint(Exception e) | |
| InvalidUnicodeCodePoint | back to summary |
|---|---|
| public InvalidUnicodeCodePoint(String msg, Exception e) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Appendable | |
| private int | |
| private int | |
| private int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | close()
Overrides java. Implements java. Closes this stream and releases any system resources associated with it. |
| public final Appendable | |
| private void | |
| public final void | write(int
the b)byte.Implements abstract java. Writes the specified byte to this output stream. |
| public final void | write(byte[]
the data. bytes)Overrides java. Writes |
| public final void | write(byte[]
the data. bytes, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. Writes |
| private final void | |
| private final void | |
| private final void |
| _char_stream | back to summary |
|---|---|
| private final Appendable _char_stream | |
| _expected_count | back to summary |
|---|---|
| private int _expected_count | |
| _pending_c1 | back to summary |
|---|---|
| private int _pending_c1 | |
| _pending_c2 | back to summary |
|---|---|
| private int _pending_c2 | |
| _pending_c3 | back to summary |
|---|---|
| private int _pending_c3 | |
| _pending_count | back to summary |
|---|---|
| private int _pending_count | |
| UTF8ToChar | back to summary |
|---|---|
| public UTF8ToChar(Appendable charStream) | |
| close | back to summary |
|---|---|
| public final void close() throws IOException Overrides java. Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| getAppendable | back to summary |
|---|---|
| public final Appendable getAppendable() | |
| throwBadContinuationByte | back to summary |
|---|---|
| private void throwBadContinuationByte() throws IOException | |
| write | back to summary |
|---|---|
| public final void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public final void write(byte[] bytes) throws IOException Overrides java. Doc from java. Writes
| |
| write | back to summary |
|---|---|
| public final void write(byte[] bytes, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |
| write_helper_continue | back to summary |
|---|---|
| private final void write_helper_continue(int b) throws IOException | |
| write_helper_start_sequence | back to summary |
|---|---|
| private final void write_helper_start_sequence(int b) throws IOException | |
| write_helper_write_char | back to summary |
|---|---|
| private final void write_helper_write_char(int b) throws IOException | |