Maven module :un.api : api-encoding :
Class : un.api.io.SeekableByteBuffer
Extends/Implements : -
Subclasses : -

Seekable byte buffer, used to map large amount of datas.
author  Johann Sorel


Variables : -
Functions : getSize, isReadable, isWritable, isResizable, setPosition, getPosition, skip, skipAll, read, read, read, read, write, write, write, insert, insert, insert, remove, flush, dispose




Total size of this buffer.
return  size in bytes.
long getSize ()


Indicate if reading operations are supported.
methods : read(...) and skip(...)
return  true if reading operations are supported
boolean isReadable ()


Indicate if writing operations are supported.
methods : write(...)
return  true if writing operations are supported
boolean isWritable ()


Indicate if resizing operations are supported.
methods : insert(...) and remove(...)
return  true if resizing operations are supported
boolean isResizable ()


Move buffer to given position.
param  position new position
void setPosition (long position)


Get buffer current position.
return  position
throws  IOException
long getPosition ()


Skip given number of bytes.
This method may not skip all bytes in one time
param  nb, number of bytes to skip
return  skipped bytes
throws  IOException
long skip (long nb)


Skip given number of bytes.
This method ensure all byes are skipped.
param  nb
throws  IOException
void skipAll (long nb)


Get a single byte, moves position by 1.
return
throws  IOException
int read ()


Get multiple bytes, moves position by number of bytes.
param  nb
return
throws  IOException
byte[] read (int nb)


Get multiple bytes, moves position by number of bytes.
param  buffer
return
throws  IOException
byte[] read (byte[] buffer)


Get multiple bytes, moves position by number of bytes.
param  buffer
param  offset
param  length
return
throws  IOException
byte[] read (byte[] buffer, int offset, int length)


Set a single byte, moves position by 1.
param  b
throws  IOException
void write (byte b)


Set multiple bytes, moves position by number of bytes.
param  buffer
throws  IOException
void write (byte[] buffer)


Set multiple bytes, moves position by number of bytes.
param  buffer
param  offset
param  length
throws  IOException
void write (byte[] buffer, int offset, int length)


Insert a single byte, moves position by 1 and grow size.
param  b
throws  IOException
void insert (byte b)


Insert multiple bytes, moves position by number of bytes and grow size.
param  buffer
throws  IOException
void insert (byte[] buffer)


Insert multiple bytes, moves position by number of bytes and grow size.
param  buffer
param  offset
param  length
throws  IOException
void insert (byte[] buffer, int offset, int length)


Remove number of bytes located after current position.
Position is unchanged
param  nb number of bytes to remove
throws  IOException
void remove (int nb)


Flush any waiting operations.
throws  IOException
void flush ()


Release resources.
throws  IOException
void dispose ()