Block management and low-level Ion encoding concerns for the IonRawBinaryWriter.
| Modifier and Type | Field and Description |
|---|---|
| private final BlockAllocator | |
| private static final int | |
| private final List | |
| private Block | |
| private Runnable | |
| private static final char | |
| private static final char | |
| private int | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final char | |
| private static final char | |
| 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 | |
| private static final int | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public static int | |
| public static int | |
| public static int | |
| public static int | |
| private int | |
| private int | |
| public long | |
| public int | |
| public void | |
| public void | shiftBytesLeft(int
The number of bytes at the end of the buffer that we'll be shifting to the left. length, int The number of bytes to the left that we'll be shifting. shiftBy)Shifts the last `length` bytes in the buffer to the left. |
| private void | shiftBytesLeftAcrossBlocks(int
The number of bytes at the end of the buffer that we'll be shifting to the left. length, int The number of bytes to the left that we'll be shifting. shiftBy)Shifts the last `length` bytes in the buffer to the left. |
| private void | shiftBytesLeftWithinASingleBlock(int
The number of bytes at the end of the buffer that we'll be shifting to the left. length, int The number of bytes to the left that we'll be shifting. shiftBy)Shifts the last `length` bytes in the buffer to the left. |
| public void | |
| public static int | |
| public void | |
| public void | writeBytes(final byte[] bytes, final int off, final int len)
Writes an array of bytes to the buffer expanding if necessary. |
| public void | writeBytes(byte[] bytes)
Writes an array of bytes to the buffer expanding if necessary, defaulting to the entire array. |
| private void | |
| public int | writeFixedInt(final long value)
Writes a FixedInt to this WriteBuffer, using the minimum number of bytes needed to represent the number. |
| private int | writeFixedIntOrUInt(final long value, final int numBytes)
Because the fixed int and fixed uint encodings are so similar, we can use this method to write either one as long as we provide the correct number of bytes needed to encode the value. |
| public int | writeFixedUInt(final long value)
Writes a FixedUInt to this WriteBuffer, using the minimum number of bytes needed to represent the number. |
| public int | writeFlexInt(final long value)
Writes a FlexInt to this WriteBuffer, returning the number of bytes that were needed to encode the value |
| private int | writeFlexIntOrUInt(final long value, final int numBytes)
Because the flex int and flex uint encodings are so similar, we can use this method to write either one as long as we provide the correct number of bytes needed to encode the value. |
| public int | writeFlexUInt(final long value)
Writes a FlexUInt to this WriteBuffer, returning the number of bytes that were needed to encode the value |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | writeLowerNibbleAt(final long
represents the position of the byte that will be overwritten. position, final long represents the length value of the container. value)Overwrite the lower nibble of the specified type descriptor byte with the length information. |
| public void | |
| public void | writeTo(final OutputStream out, long position, long length)
Write a specific segment of data from the buffer to a stream. |
| public void | |
| private void | |
| public void | |
| private void | |
| public void | |
| private void | |
| public void | |
| private void | |
| public void | |
| private void | |
| public void | |
| private void | |
| public void | |
| private void | |
| public void | |
| public void | |
| public int | |
| public int | |
| private int | |
| private int | |
| private int | |
| public int | |
| private int | |
| public int | |
| public void | |
| private int | |
| public void | |
| private void | |
| private int | |
| private int | |
| private int | |
| private int | |
| public static void | writeVarUIntTo(final OutputStream out, final long value)
Write the varUint value to the outputStream. |
| allocator | back to summary |
|---|---|
| private final BlockAllocator allocator | |
| BITS_PER_SURROGATE | back to summary |
|---|---|
| private static final int BITS_PER_SURROGATE | |
| blocks | back to summary |
|---|---|
| private final List<Block> blocks | |
| current | back to summary |
|---|---|
| private Block current | |
| endOfBlockCallBack | back to summary |
|---|---|
| private Runnable endOfBlockCallBack | |
| HIGH_SURROGATE_FIRST | back to summary |
|---|---|
| private static final char HIGH_SURROGATE_FIRST | |
| HIGH_SURROGATE_LAST | back to summary |
|---|---|
| private static final char HIGH_SURROGATE_LAST | |
| index | back to summary |
|---|---|
| private int index | |
| INT16_SIGN_MASK | back to summary |
|---|---|
| private static final long INT16_SIGN_MASK | |
| INT24_SIGN_MASK | back to summary |
|---|---|
| private static final long INT24_SIGN_MASK | |
| INT32_SIGN_MASK | back to summary |
|---|---|
| private static final long INT32_SIGN_MASK | |
| INT40_SIGN_MASK | back to summary |
|---|---|
| private static final long INT40_SIGN_MASK | |
| INT48_SIGN_MASK | back to summary |
|---|---|
| private static final long INT48_SIGN_MASK | |
| INT56_SIGN_MASK | back to summary |
|---|---|
| private static final long INT56_SIGN_MASK | |
| INT64_SIGN_MASK | back to summary |
|---|---|
| private static final long INT64_SIGN_MASK | |
| INT8_SIGN_MASK | back to summary |
|---|---|
| private static final long INT8_SIGN_MASK | |
| LOW_SURROGATE_FIRST | back to summary |
|---|---|
| private static final char LOW_SURROGATE_FIRST | |
| LOW_SURROGATE_LAST | back to summary |
|---|---|
| private static final char LOW_SURROGATE_LAST | |
| SURROGATE_BASE | back to summary |
|---|---|
| private static final int SURROGATE_BASE | |
| UINT_2_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UINT_2_OCTET_SHIFT | |
| UINT_3_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UINT_3_OCTET_SHIFT | |
| UINT_4_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UINT_4_OCTET_SHIFT | |
| UINT_5_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UINT_5_OCTET_SHIFT | |
| UINT_6_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UINT_6_OCTET_SHIFT | |
| UINT_7_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UINT_7_OCTET_SHIFT | |
| UINT_8_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UINT_8_OCTET_SHIFT | |
| UTF8_2_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final int UTF8_2_OCTET_MIN_VALUE | |
| UTF8_2_OCTET_PREFIX_MASK | back to summary |
|---|---|
| private static final int UTF8_2_OCTET_PREFIX_MASK | |
| UTF8_2_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UTF8_2_OCTET_SHIFT | |
| UTF8_3_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final int UTF8_3_OCTET_MIN_VALUE | |
| UTF8_3_OCTET_PREFIX_MASK | back to summary |
|---|---|
| private static final int UTF8_3_OCTET_PREFIX_MASK | |
| UTF8_3_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UTF8_3_OCTET_SHIFT | |
| UTF8_4_OCTET_PREFIX_MASK | back to summary |
|---|---|
| private static final int UTF8_4_OCTET_PREFIX_MASK | |
| UTF8_4_OCTET_SHIFT | back to summary |
|---|---|
| private static final int UTF8_4_OCTET_SHIFT | |
| UTF8_BITS_PER_FOLLOW_OCTET | back to summary |
|---|---|
| private static final int UTF8_BITS_PER_FOLLOW_OCTET | |
| UTF8_FOLLOW_MASK | back to summary |
|---|---|
| private static final int UTF8_FOLLOW_MASK | |
| UTF8_FOLLOW_PREFIX_MASK | back to summary |
|---|---|
| private static final int UTF8_FOLLOW_PREFIX_MASK | |
| VAR_INT_10_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_10_OCTET_MIN_VALUE | |
| VAR_INT_10_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_INT_10_OCTET_SHIFT | |
| VAR_INT_2_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_2_OCTET_MIN_VALUE | |
| VAR_INT_3_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_3_OCTET_MIN_VALUE | |
| VAR_INT_4_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_4_OCTET_MIN_VALUE | |
| VAR_INT_5_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_5_OCTET_MIN_VALUE | |
| VAR_INT_6_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_6_OCTET_MIN_VALUE | |
| VAR_INT_7_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_7_OCTET_MIN_VALUE | |
| VAR_INT_8_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_8_OCTET_MIN_VALUE | |
| VAR_INT_9_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_INT_9_OCTET_MIN_VALUE | |
| VAR_INT_BITS_PER_OCTET | back to summary |
|---|---|
| private static final long VAR_INT_BITS_PER_OCTET | |
| VAR_INT_BITS_PER_SIGNED_OCTET | back to summary |
|---|---|
| private static final long VAR_INT_BITS_PER_SIGNED_OCTET | |
| VAR_INT_FINAL_OCTET_SIGNAL_MASK | back to summary |
|---|---|
| private static final long VAR_INT_FINAL_OCTET_SIGNAL_MASK | |
| VAR_INT_MASK | back to summary |
|---|---|
| private static final long VAR_INT_MASK | |
| VAR_INT_SIGNBIT_OFF_MASK | back to summary |
|---|---|
| private static final long VAR_INT_SIGNBIT_OFF_MASK | |
| VAR_INT_SIGNBIT_ON_MASK | back to summary |
|---|---|
| private static final long VAR_INT_SIGNBIT_ON_MASK | |
| VAR_INT_SIGNED_OCTET_MASK | back to summary |
|---|---|
| private static final long VAR_INT_SIGNED_OCTET_MASK | |
| VAR_SINT_2_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_SINT_2_OCTET_SHIFT | |
| VAR_SINT_3_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_SINT_3_OCTET_SHIFT | |
| VAR_SINT_4_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_SINT_4_OCTET_SHIFT | |
| VAR_SINT_5_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_SINT_5_OCTET_SHIFT | |
| VAR_UINT_2_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_UINT_2_OCTET_MIN_VALUE | |
| VAR_UINT_2_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_UINT_2_OCTET_SHIFT | |
| VAR_UINT_3_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_UINT_3_OCTET_MIN_VALUE | |
| VAR_UINT_3_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_UINT_3_OCTET_SHIFT | |
| VAR_UINT_4_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_UINT_4_OCTET_MIN_VALUE | |
| VAR_UINT_4_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_UINT_4_OCTET_SHIFT | |
| VAR_UINT_5_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_UINT_5_OCTET_MIN_VALUE | |
| VAR_UINT_5_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_UINT_5_OCTET_SHIFT | |
| VAR_UINT_6_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_UINT_6_OCTET_MIN_VALUE | |
| VAR_UINT_6_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_UINT_6_OCTET_SHIFT | |
| VAR_UINT_7_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_UINT_7_OCTET_MIN_VALUE | |
| VAR_UINT_7_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_UINT_7_OCTET_SHIFT | |
| VAR_UINT_8_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_UINT_8_OCTET_MIN_VALUE | |
| VAR_UINT_8_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_UINT_8_OCTET_SHIFT | |
| VAR_UINT_9_OCTET_MIN_VALUE | back to summary |
|---|---|
| private static final long VAR_UINT_9_OCTET_MIN_VALUE | |
| VAR_UINT_9_OCTET_SHIFT | back to summary |
|---|---|
| private static final long VAR_UINT_9_OCTET_SHIFT | |
| WriteBuffer | back to summary |
|---|---|
| public WriteBuffer(final BlockAllocator allocator, Runnable endOfBlockCallBack) | |
| allocateNewBlock | back to summary |
|---|---|
| private void allocateNewBlock() | |
| close | back to summary |
|---|---|
| public void close() 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 | |
| fixedIntLength | back to summary |
|---|---|
| public static int fixedIntLength(final long value) Get the length of FixedInt for the provided value. | |
| fixedUIntLength | back to summary |
|---|---|
| public static int fixedUIntLength(final long value) Get the length of FixedUInt for the provided value. | |
| flexIntLength | back to summary |
|---|---|
| public static int flexIntLength(final long value) Get the length of FlexInt for the provided value. | |
| flexUIntLength | back to summary |
|---|---|
| public static int flexUIntLength(final long value) Get the length of FlexUInt for the provided value. | |
| index | back to summary |
|---|---|
| private int index(final long position) Returns the block index for the given position. | |
| offset | back to summary |
|---|---|
| private int offset(final long position) Returns the offset within the block for a given position. | |
| position | back to summary |
|---|---|
| public long position() Returns the logical position in the current block. | |
| remaining | back to summary |
|---|---|
| public int remaining() Returns the amount of capacity left in the current block. | |
| reset | back to summary |
|---|---|
| public void reset() Resets the write buffer to empty. | |
| shiftBytesLeft | back to summary |
|---|---|
| public void shiftBytesLeft(int length, int shiftBy) Shifts the last `length` bytes in the buffer to the left. This can be used when a value's header was preallocated but the value's encoded size proved to be much smaller than anticipated. The caller must guarantee that the buffer contains enough bytes to perform the requested shift.
| |
| shiftBytesLeftAcrossBlocks | back to summary |
|---|---|
| private void shiftBytesLeftAcrossBlocks(int length, int shiftBy) Shifts the last `length` bytes in the buffer to the left. Unlike
| |
| shiftBytesLeftWithinASingleBlock | back to summary |
|---|---|
| private void shiftBytesLeftWithinASingleBlock(int length, int shiftBy) Shifts the last `length` bytes in the buffer to the left. The caller must guarantee that the `current` Block contains at least `length + shiftBy` bytes. This ensures that we're shifting a contiguous slice of bytes within a single block.
| |
| truncate | back to summary |
|---|---|
| public void truncate(final long position) Resets the write buffer to a particular point. | |
| varUIntLength | back to summary |
|---|---|
| public static int varUIntLength(final long value) Get the length of varUint for the provided value. | |
| writeByte | back to summary |
|---|---|
| public void writeByte(final byte octet) Writes a single octet to the buffer, expanding if necessary. | |
| writeBytes | back to summary |
|---|---|
| public void writeBytes(final byte[] bytes, final int off, final int len) Writes an array of bytes to the buffer expanding if necessary. | |
| writeBytes | back to summary |
|---|---|
| public void writeBytes(byte[] bytes) Writes an array of bytes to the buffer expanding if necessary, defaulting to the entire array. | |
| writeBytesSlow | back to summary |
|---|---|
| private void writeBytesSlow(final byte[] bytes, int off, int len) | |
| writeFixedInt | back to summary |
|---|---|
| public int writeFixedInt(final long value) Writes a FixedInt to this WriteBuffer, using the minimum number of bytes needed to represent the number. Returns the number of bytes that were needed to encode the value. | |
| writeFixedIntOrUInt | back to summary |
|---|---|
| private int writeFixedIntOrUInt(final long value, final int numBytes) Because the fixed int and fixed uint encodings are so similar, we can use this method to write either one as long as we provide the correct number of bytes needed to encode the value. | |
| writeFixedUInt | back to summary |
|---|---|
| public int writeFixedUInt(final long value) Writes a FixedUInt to this WriteBuffer, using the minimum number of bytes needed to represent the number. Returns the number of bytes that were needed to encode the value. | |
| writeFlexInt | back to summary |
|---|---|
| public int writeFlexInt(final long value) Writes a FlexInt to this WriteBuffer, returning the number of bytes that were needed to encode the value | |
| writeFlexIntOrUInt | back to summary |
|---|---|
| private int writeFlexIntOrUInt(final long value, final int numBytes) Because the flex int and flex uint encodings are so similar, we can use this method to write either one as long as we provide the correct number of bytes needed to encode the value. | |
| writeFlexUInt | back to summary |
|---|---|
| public int writeFlexUInt(final long value) Writes a FlexUInt to this WriteBuffer, returning the number of bytes that were needed to encode the value | |
| writeInt16 | back to summary |
|---|---|
| public void writeInt16(long value) | |
| writeInt24 | back to summary |
|---|---|
| public void writeInt24(long value) | |
| writeInt32 | back to summary |
|---|---|
| public void writeInt32(long value) | |
| writeInt40 | back to summary |
|---|---|
| public void writeInt40(long value) | |
| writeInt48 | back to summary |
|---|---|
| public void writeInt48(long value) | |
| writeInt56 | back to summary |
|---|---|
| public void writeInt56(long value) | |
| writeInt64 | back to summary |
|---|---|
| public void writeInt64(long value) | |
| writeInt8 | back to summary |
|---|---|
| public void writeInt8(long value) | |
| writeLowerNibbleAt | back to summary |
|---|---|
| public void writeLowerNibbleAt(final long position, final long value) Overwrite the lower nibble of the specified type descriptor byte with the length information.
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(final OutputStream out) throws IOException Write the entire buffer to output stream. | |
| writeTo | back to summary |
|---|---|
| public void writeTo(final OutputStream out, long position, long length) throws IOException Write a specific segment of data from the buffer to a stream. | |
| writeUInt16 | back to summary |
|---|---|
| public void writeUInt16(long value) | |
| writeUInt16Slow | back to summary |
|---|---|
| private void writeUInt16Slow(long value) | |
| writeUInt24 | back to summary |
|---|---|
| public void writeUInt24(long value) | |
| writeUInt24Slow | back to summary |
|---|---|
| private void writeUInt24Slow(long value) | |
| writeUInt32 | back to summary |
|---|---|
| public void writeUInt32(long value) | |
| writeUInt32Slow | back to summary |
|---|---|
| private void writeUInt32Slow(long value) | |
| writeUInt40 | back to summary |
|---|---|
| public void writeUInt40(long value) | |
| writeUInt40Slow | back to summary |
|---|---|
| private void writeUInt40Slow(long value) | |
| writeUInt48 | back to summary |
|---|---|
| public void writeUInt48(long value) | |
| writeUInt48Slow | back to summary |
|---|---|
| private void writeUInt48Slow(long value) | |
| writeUInt56 | back to summary |
|---|---|
| public void writeUInt56(long value) | |
| writeUInt56Slow | back to summary |
|---|---|
| private void writeUInt56Slow(long value) | |
| writeUInt64 | back to summary |
|---|---|
| public void writeUInt64(long value) | |
| writeUInt64Slow | back to summary |
|---|---|
| private void writeUInt64Slow(long value) | |
| writeUInt8 | back to summary |
|---|---|
| public void writeUInt8(long value) | |
| writeUInt8At | back to summary |
|---|---|
| public void writeUInt8At(final long position, final long value) | |
| writeUTF8 | back to summary |
|---|---|
| public int writeUTF8(final CharSequence chars, int off, int len) Returns the number of octets written. | |
| writeUTF8 | back to summary |
|---|---|
| public int writeUTF8(final CharSequence chars) Returns the number of octets written. | |
| writeUTF8Slow | back to summary |
|---|---|
| private int writeUTF8Slow(final CharSequence chars, int off, int len) | |
| writeUTF8UpTo2Byte | back to summary |
|---|---|
| private int writeUTF8UpTo2Byte(final CharSequence chars, int off, int len) | |
| writeUTF8UpTo3Byte | back to summary |
|---|---|
| private int writeUTF8UpTo3Byte(final CharSequence chars, int off, int len) | |
| writeVarInt | back to summary |
|---|---|
| public int writeVarInt(long value) | |
| writeVarIntSlow | back to summary |
|---|---|
| private int writeVarIntSlow(final long magnitude, final long signMask) | |
| writeVarUInt | back to summary |
|---|---|
| public int writeVarUInt(final long value) | |
| writeVarUIntDirect1At | back to summary |
|---|---|
| public void writeVarUIntDirect1At(final long position, final long value) | |
| writeVarUIntDirect2 | back to summary |
|---|---|
| private int writeVarUIntDirect2(final long value) | |
| writeVarUIntDirect2At | back to summary |
|---|---|
| public void writeVarUIntDirect2At(long position, long value) | |
| writeVarUIntDirect2StraddlingAt | back to summary |
|---|---|
| private void writeVarUIntDirect2StraddlingAt(final int index, final int offset, final long value) | |
| writeVarUIntDirect3 | back to summary |
|---|---|
| private int writeVarUIntDirect3(final long value) | |
| writeVarUIntDirect4 | back to summary |
|---|---|
| private int writeVarUIntDirect4(final long value) | |
| writeVarUIntDirect5 | back to summary |
|---|---|
| private int writeVarUIntDirect5(final long value) | |
| writeVarUIntSlow | back to summary |
|---|---|
| private int writeVarUIntSlow(final long value) | |
| writeVarUIntTo | back to summary |
|---|---|
| public static void writeVarUIntTo(final OutputStream out, final long value) throws IOException Write the varUint value to the outputStream. | |