Class RandomAccessStore
java.lang.Object
org.teamapps.universaldb.index.log.RandomAccessStore
public class RandomAccessStore
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description RandomAccessStore(java.io.File basePath, java.lang.String name) -
Method Summary
Modifier and Type Method Description voiddrop()longgetSize()byte[]read(long pos, int length)booleanreadBoolean(long pos)intreadInt(long pos)longreadLong(long pos)java.lang.StringreadString(long pos)voidwrite(long pos, byte[] bytes)voidwriteBoolean(long pos, boolean value)voidwriteInt(long pos, int value)voidwriteLong(long pos, long value)voidwriteString(long pos, java.lang.String value)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RandomAccessStore
public RandomAccessStore(java.io.File basePath, java.lang.String name)
-
-
Method Details
-
getSize
public long getSize() -
write
public void write(long pos, byte[] bytes) throws java.io.IOException- Throws:
java.io.IOException
-
read
public byte[] read(long pos, int length) throws java.io.IOException- Throws:
java.io.IOException
-
writeString
public void writeString(long pos, java.lang.String value) throws java.io.IOException- Throws:
java.io.IOException
-
readString
public java.lang.String readString(long pos) throws java.io.IOException- Throws:
java.io.IOException
-
writeInt
public void writeInt(long pos, int value) throws java.io.IOException- Throws:
java.io.IOException
-
readInt
public int readInt(long pos) throws java.io.IOException- Throws:
java.io.IOException
-
writeLong
public void writeLong(long pos, long value) throws java.io.IOException- Throws:
java.io.IOException
-
readLong
public long readLong(long pos) throws java.io.IOException- Throws:
java.io.IOException
-
writeBoolean
public void writeBoolean(long pos, boolean value) throws java.io.IOException- Throws:
java.io.IOException
-
readBoolean
public boolean readBoolean(long pos) throws java.io.IOException- Throws:
java.io.IOException
-
drop
public void drop()
-