Package com.mckoi.store
Class HeapStore.HeapAreaWriter
- java.lang.Object
-
- com.mckoi.store.HeapStore.HeapArea
-
- com.mckoi.store.HeapStore.HeapAreaWriter
-
- All Implemented Interfaces:
Area
,AreaWriter
,MutableArea
- Enclosing class:
- HeapStore
private static class HeapStore.HeapAreaWriter extends HeapStore.HeapArea implements AreaWriter
-
-
Constructor Summary
Constructors Constructor Description HeapAreaWriter(long id, byte[] heap_area, int offset, int length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finish()
Finishes the area writer object.java.io.OutputStream
getOutputStream()
Returns an OutputStream that can be used to write to this area.-
Methods inherited from class com.mckoi.store.HeapStore.HeapArea
capacity, checkOut, copyTo, get, get, getChar, getID, getInt, getLong, getShort, position, position, put, put, put, putChar, putInt, putLong, putShort, toString
-
-
-
-
Method Detail
-
getOutputStream
public java.io.OutputStream getOutputStream()
Description copied from interface:AreaWriter
Returns an OutputStream that can be used to write to this area. This stream is backed by this area writer, so if 10 bytes area written to the output stream then the writer position is also incremented by 10 bytes.- Specified by:
getOutputStream
in interfaceAreaWriter
-
finish
public void finish() throws java.io.IOException
Description copied from interface:AreaWriter
Finishes the area writer object. This must be called when the area is completely initialized. After this method is called the object is invalidated and the area can be accessed in the store.- Specified by:
finish
in interfaceAreaWriter
- Throws:
java.io.IOException
-
-