An internal helper class for encoding WiredTiger packed values. More...
Public Member Functions | |
| PackOutputStream (String format) | |
| Constructor. More... | |
| String | getFormat () |
| Returns the raw packing format string. | |
| byte[] | getValue () |
| Returns the current packed value. | |
| void | reset () |
| Reset the stream position. | |
| void | addByte (byte value) throws WiredTigerPackingException |
| Add a byte field to the stream. More... | |
| void | addByteArray (byte[] value) throws WiredTigerPackingException |
| Add a byte array field to the stream. More... | |
| void | addByteArray (byte[] value, int off, int len) throws WiredTigerPackingException |
| Add a byte array field to the stream. More... | |
| void | addInt (int value) throws WiredTigerPackingException |
| Add an integer field to the stream. More... | |
| void | addLong (long value) throws WiredTigerPackingException |
| Add a long field to the stream. More... | |
| void | addRecord (long value) throws WiredTigerPackingException |
| Add a record field to the stream. More... | |
| void | addShort (short value) throws WiredTigerPackingException |
| Add a short field to the stream. More... | |
| void | addString (String value) throws WiredTigerPackingException |
| Add a string field to the stream. More... | |
Protected Attributes | |
| PackFormatInputStream | format |
| ByteArrayOutputStream | packed |
| byte[] | intBuf |
An internal helper class for encoding WiredTiger packed values.
Applications should not need to use this class.
| com.wiredtiger.db.PackOutputStream.PackOutputStream | ( | String | format | ) |
Constructor.
| format | A String that contains the WiredTiger format that defines the layout of this packed value. |
| void com.wiredtiger.db.PackOutputStream.addByte | ( | byte | value | ) | throws WiredTigerPackingException |
Add a byte field to the stream.
| value | The byte value to be added. |
| void com.wiredtiger.db.PackOutputStream.addByteArray | ( | byte[] | value | ) | throws WiredTigerPackingException |
Add a byte array field to the stream.
| value | The byte array value to be added. |
| void com.wiredtiger.db.PackOutputStream.addByteArray | ( | byte[] | value, |
| int | off, | ||
| int | len | ||
| ) | throws WiredTigerPackingException |
Add a byte array field to the stream.
| value | The byte array value to be added. |
| off | The offset from the start of value to begin using the array. |
| len | The length of the value to encode. |
| void com.wiredtiger.db.PackOutputStream.addInt | ( | int | value | ) | throws WiredTigerPackingException |
Add an integer field to the stream.
| value | The integer value to be added. |
| void com.wiredtiger.db.PackOutputStream.addLong | ( | long | value | ) | throws WiredTigerPackingException |
Add a long field to the stream.
| value | The long value to be added. |
| void com.wiredtiger.db.PackOutputStream.addRecord | ( | long | value | ) | throws WiredTigerPackingException |
Add a record field to the stream.
| value | The record value to be added. |
| void com.wiredtiger.db.PackOutputStream.addShort | ( | short | value | ) | throws WiredTigerPackingException |
Add a short field to the stream.
| value | The short value to be added. |
| void com.wiredtiger.db.PackOutputStream.addString | ( | String | value | ) | throws WiredTigerPackingException |
Add a string field to the stream.
| value | The string value to be added. |