com.bigdata.io
Interface IFixedDataRecord

All Superinterfaces:
IByteArraySlice, IDataRecord
All Known Implementing Classes:
AbstractFixedByteArrayBuffer, FixedByteArrayBuffer

public interface IFixedDataRecord
extends IDataRecord

Interface adds some methods for stream-based access to IDataRecord.

Note: These methods are isolated on this interface to prevent confusion with the stream-based semantics of the ByteArrayBuffer.

Version:
$Id: IFixedDataRecord.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 DataInputBuffer getDataInput()
          Return an input stream that will read from the slice.
 it.unimi.dsi.io.InputBitStream getInputBitStream()
          Return a bit stream that will read from the slice.
 void writeOn(DataOutput out)
          Write the slice on the output stream.
 void writeOn(OutputStream os)
          Write the slice on the output stream.
 void writeOn(OutputStream os, int aoff, int alen)
          Write part of the slice on the output stream.
 
Methods inherited from interface com.bigdata.io.IDataRecord
asByteBuffer, get, get, getBit, getByte, getDouble, getFloat, getInt, getLong, getShort, put, put, putByte, putDouble, putFloat, putInt, putLong, putShort, setBit, slice, toByteArray
 
Methods inherited from interface com.bigdata.io.IByteArraySlice
array, len, off
 

Method Detail

getDataInput

DataInputBuffer getDataInput()
Return an input stream that will read from the slice.


getInputBitStream

it.unimi.dsi.io.InputBitStream getInputBitStream()
Return a bit stream that will read from the slice.

Note: You DO NOT need to close this stream since it is backed by a byte[]. In fact, InputBitStream.close() when backed by a byte[] appears to have relatively high overhead, which is weird.


writeOn

void writeOn(OutputStream os)
             throws IOException
Write the slice on the output stream.

Parameters:
os - The output stream.
Throws:
IOException

writeOn

void writeOn(DataOutput out)
             throws IOException
Write the slice on the output stream.

Parameters:
os - The output stream.
Throws:
IOException

writeOn

void writeOn(OutputStream os,
             int aoff,
             int alen)
             throws IOException
Write part of the slice on the output stream.

Parameters:
os - The output stream.
Throws:
IOException


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.