public interface AreaWriter
AreaWriter writer = store.createArea(16); writer.putInt(3); writer.putLong(100030); writer.putByte(1); writer.putShort(0); writer.putByte(2); writer.finish();When the 'finish' method is called, the AreaWriter object is invalidated and the area can then be accessed in the store by the 'getArea' method.
Note that an area may only be written sequentially using this object. This is by design and allows for the area initialization process to be optimized.
Modifier and Type | Method and Description |
---|---|
int |
capacity()
Returns the size of this area.
|
void |
finish()
Finishes the area writer object.
|
long |
getID()
Returns the unique identifier that represents this area in the store.
|
OutputStream |
getOutputStream()
Returns an OutputStream that can be used to write to this area.
|
void |
put(byte b) |
void |
put(byte[] buf) |
void |
put(byte[] buf,
int off,
int len) |
void |
putChar(char c) |
void |
putInt(int i) |
void |
putLong(long l) |
void |
putShort(short s) |
long getID()
OutputStream getOutputStream()
int capacity()
void finish() throws IOException
IOException
void put(byte b) throws IOException
IOException
void put(byte[] buf, int off, int len) throws IOException
IOException
void put(byte[] buf) throws IOException
IOException
void putShort(short s) throws IOException
IOException
void putInt(int i) throws IOException
IOException
void putLong(long l) throws IOException
IOException
void putChar(char c) throws IOException
IOException
Copyright © 2015. All rights reserved.