It is also meant to be reused, so that it does not have to pressure the GC, if that is desirable.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| public static class | |
| public static class | BlockedBuffer.
Reads data from a byte buffer, keeps a local position and a current block. |
| public static class | BlockedBuffer.
Reads data from a byte buffer, keeps a local position and a current block. |
| public static class | |
| private static class | |
| public static interface | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv ArrayList | |
| public int | |
| public int | |
| pack-priv int | |
| pack-priv static int | |
| pack-priv static int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv Object | |
| pack-priv int | |
| pack-priv TreeSet | |
| pack-priv static int | |
| pack-priv int | |
| pack-priv static boolean | |
| pack-priv static final boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | BlockedBuffer(int
the number of bytes to allocate. initialSize)Creates a new buffer, preallocating some initial capacity. |
| public | BlockedBuffer(byte[]
the initial data to be buffered. data)Creates a new buffer, assuming ownership of given data. |
| public | BlockedBuffer(InputStream
must not be null. data)Creates a new buffer containing all data remaining on an
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| private BlockedBuffer. | |
| private void | |
| private void | |
| public BlockedBuffer | |
| pack-priv int | |
| pack-priv BlockedBuffer. | Returns: curr block ready to be read fromglobal position to be read from pos)find the block where this offset (newPosition) has already been written. |
| pack-priv BlockedBuffer. | Returns: curr block ready to be written toglobal position to be written to pos)find the block where this offset (newPosition) should be written. |
| pack-priv final BlockedBuffer. | |
| pack-priv int | |
| private BlockedBuffer. | Returns: bbBlock the initial current blockor 0 initialSize, BlockedBuffer.or null initialBlockInitializes the various members such as the block arraylist the initial block and the various values like the block size upper limit. |
| pack-priv int | Returns: int number of bytes insertednumber of bytes to make space for len)dispatcher for the various forms of insert we encounter calls one of the four helpers depending on the case that is needed to inser here |
| private int | insertAsManyBlocksAsNeeded(Object caller, int version, BlockedBuffer.
|
| private void | |
| private int | insertInCurrAndNext(Object caller, int version, BlockedBuffer.
|
| private int | insertInCurrOnly(Object caller, int version, BlockedBuffer.
this handles insert when there's enough room in the current block |
| private BlockedBuffer. | insertMakeNewTailBlock(Object caller, int version, BlockedBuffer.
|
| pack-priv boolean | |
| private int | |
| public void | |
| public void | |
| public void | |
| public void | |
| pack-priv BlockedBuffer. | |
| public static void | |
| pack-priv static void | |
| public static void | |
| public final int | |
| pack-priv void | |
| pack-priv BlockedBuffer. |