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 voidfinish()Finishes the area writer object.java.io.OutputStreamgetOutputStream()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:AreaWriterReturns 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:
getOutputStreamin interfaceAreaWriter
-
finish
public void finish() throws java.io.IOExceptionDescription copied from interface:AreaWriterFinishes 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:
finishin interfaceAreaWriter- Throws:
java.io.IOException
-
-