Package com.mckoi.store
Interface Area
-
- All Known Subinterfaces:
MutableArea
public interface AreaAn interface for access the contents of an area of a store. The area object maintains a pointer that can be manipulated and read from.- Author:
- Tobias Downer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcapacity()Returns the capacity of the area.voidcopyTo(AreaWriter destination_writer, int size)Copies 'size' bytes from the current position of this Area to the destination AreaWriter.byteget()voidget(byte[] buf, int off, int len)chargetChar()longgetID()Returns the unique identifier that represents this area.intgetInt()longgetLong()shortgetShort()intposition()Returns the current position of the pointer within the area.voidposition(int position)Sets the position within the area.
-
-
-
Method Detail
-
getID
long getID()
Returns the unique identifier that represents this area.
-
position
int position()
Returns the current position of the pointer within the area. The position starts at beginning of the area.
-
capacity
int capacity()
Returns the capacity of the area.
-
position
void position(int position) throws java.io.IOExceptionSets the position within the area.- Throws:
java.io.IOException
-
copyTo
void copyTo(AreaWriter destination_writer, int size) throws java.io.IOException
Copies 'size' bytes from the current position of this Area to the destination AreaWriter.- Throws:
java.io.IOException
-
get
byte get() throws java.io.IOException
- Throws:
java.io.IOException
-
get
void get(byte[] buf, int off, int len) throws java.io.IOException- Throws:
java.io.IOException
-
getShort
short getShort() throws java.io.IOException- Throws:
java.io.IOException
-
getInt
int getInt() throws java.io.IOException- Throws:
java.io.IOException
-
getLong
long getLong() throws java.io.IOException- Throws:
java.io.IOException
-
getChar
char getChar() throws java.io.IOException- Throws:
java.io.IOException
-
-