public interface DataAccess extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
This method makes sure that the underlying used resources are released.
|
DataAccess |
create(long bytes)
The first time you use a DataAccess object after configuring it you need to call this method.
|
boolean |
ensureCapacity(long bytes)
Ensures that the capacity of this object is at least the specified bytes.
|
void |
flush()
This method makes sure that the underlying data is written to the storage.
|
byte |
getByte(long currentPointer) |
void |
getBytes(long bytePos,
byte[] values,
int length)
Get bytes from position 'index'
|
long |
getCapacity() |
int |
getHeader(int bytePos)
Get 4 bytes from the header at 'index'
|
int |
getInt(long bytePos)
Get 4 bytes from position 'bytePos'
|
String |
getName()
The logical identification of this object.
|
int |
getSegments() |
int |
getSegmentSize() |
short |
getShort(long bytePos)
Get 2 bytes from position 'index'
|
DAType |
getType() |
boolean |
isClosed() |
boolean |
loadExisting() |
void |
setByte(long currentPointer,
byte value) |
void |
setBytes(long bytePos,
byte[] values,
int length)
Set bytes from position 'index' to the specified values
|
void |
setHeader(int bytePos,
int value)
Set 4 bytes at the header space index to the specified value
|
void |
setInt(long bytePos,
int value)
Set 4 bytes at position 'bytePos' to the specified value
|
void |
setShort(long bytePos,
short value)
Set 2 bytes at position 'index' to the specified value
|
String getName()
void setInt(long bytePos, int value)
int getInt(long bytePos)
void setShort(long bytePos, short value)
short getShort(long bytePos)
void setBytes(long bytePos, byte[] values, int length)
void getBytes(long bytePos, byte[] values, int length)
values
- acts as outputvoid setByte(long currentPointer, byte value)
byte getByte(long currentPointer)
void setHeader(int bytePos, int value)
int getHeader(int bytePos)
DataAccess create(long bytes)
void flush()
void close()
close
in interface AutoCloseable
close
in interface Closeable
boolean isClosed()
boolean loadExisting()
long getCapacity()
boolean ensureCapacity(long bytes)
create(long)
int getSegmentSize()
int getSegments()
DAType getType()
Copyright © 2012–2022. All rights reserved.