Package com.mckoi.store
Class AbstractStore.StoreAreaWriter
- java.lang.Object
-
- com.mckoi.store.AbstractStore.StoreArea
-
- com.mckoi.store.AbstractStore.StoreMutableArea
-
- com.mckoi.store.AbstractStore.StoreAreaWriter
-
- All Implemented Interfaces:
Area,AreaWriter,MutableArea
- Enclosing class:
- AbstractStore
private class AbstractStore.StoreAreaWriter extends AbstractStore.StoreMutableArea implements AreaWriter
-
-
Field Summary
-
Fields inherited from class com.mckoi.store.AbstractStore.StoreArea
buffer, BUFFER_SIZE, end_pointer, id, position, start_pointer
-
-
Constructor Summary
Constructors Constructor Description StoreAreaWriter(long pointer, long fixed_size)
-
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.AbstractStore.StoreMutableArea
checkOut, put, put, put, putChar, putInt, putLong, putShort, toString
-
Methods inherited from class com.mckoi.store.AbstractStore.StoreArea
capacity, checkPositionBounds, copyTo, get, get, getChar, getID, getInt, getLong, getShort, position, position
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
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
-
-