Exemplo n.º 1
0
 @Override
 public void writeShort(long iOffset, final short iValue) throws IOException {
   iOffset = checkRegions(iOffset, OBinaryProtocol.SIZE_INT);
   ByteBuffer buffer = getWriteBuffer(OBinaryProtocol.SIZE_SHORT);
   buffer.putShort(iValue);
   writeData(buffer, iOffset);
 }
Exemplo n.º 2
0
 @Override
 public void writeLong(long iOffset, final long iValue) throws IOException {
   iOffset = checkRegions(iOffset, OBinaryProtocol.SIZE_LONG);
   ByteBuffer buffer = getWriteBuffer(OBinaryProtocol.SIZE_LONG);
   buffer.putLong(iValue);
   writeData(buffer, iOffset);
 }
Exemplo n.º 3
0
 @Override
 protected void setSoftlyClosed(final boolean iValue) throws IOException {
   final ByteBuffer buffer = getWriteBuffer(OBinaryProtocol.SIZE_BYTE);
   buffer.put((byte) (iValue ? 1 : 0));
   writeData(buffer, SOFTLY_CLOSED_OFFSET);
   synch();
 }
Exemplo n.º 4
0
 @Override
 protected void writeHeader() throws IOException {
   ByteBuffer buffer = getWriteBuffer(OBinaryProtocol.SIZE_INT * 2);
   buffer.putInt(size);
   buffer.putInt(filledUpTo);
   writeData(buffer, 0);
 }
Exemplo n.º 5
0
 @Override
 public void writeHeaderLong(final int iPosition, final long iValue) throws IOException {
   ByteBuffer buffer = getWriteBuffer(OBinaryProtocol.SIZE_LONG);
   buffer.putLong(iValue);
   writeData(buffer, HEADER_DATA_OFFSET + iPosition);
 }