
public final class OFileClassic extends Object implements OClosableItem
| Modifier and Type | Field and Description |
|---|---|
static int |
HEADER_SIZE |
static String |
NAME |
static int |
VERSION_OFFSET |
| Constructor and Description |
|---|
OFileClassic(Path osFile,
int pageSize) |
| Modifier and Type | Method and Description |
|---|---|
long |
allocateSpace(int size) |
void |
close()
Closes the file.
|
void |
create()
Creates the file.
|
void |
delete()
Deletes the file.
|
boolean |
exists() |
long |
getFileSize() |
String |
getName() |
String |
getPath() |
boolean |
isOpen() |
void |
open()
Opens the file.
|
void |
read(long iOffset,
byte[] iDestBuffer,
int iLength) |
void |
read(long offset,
byte[] iData,
int iLength,
int iArrayOffset) |
void |
read(long offset,
ByteBuffer[] buffers,
boolean throwOnEof) |
void |
read(long offset,
ByteBuffer buffer,
boolean throwOnEof) |
int |
readInt(long iOffset) |
long |
readLong(long iOffset) |
void |
renameTo(Path newFile) |
void |
replaceContentWith(Path newContentFile)
Replaces the file content with the content of the provided file.
|
void |
shrink(long size)
Shrink the file content (filledUpTo attribute only)
|
void |
synch()
Synchronizes the buffered changes to disk.
|
String |
toString() |
void |
write(ArrayList<ORawPair<Long,ByteBuffer>> data,
int maxScheduledWrites) |
void |
write(long iOffset,
byte[] iSourceBuffer) |
void |
write(long iOffset,
byte[] iData,
int iSize,
int iArrayOffset) |
void |
write(long offset,
ByteBuffer buffer) |
void |
write(long offset,
ByteBuffer[] buffers) |
void |
writeByte(long iOffset,
byte iValue) |
void |
writeInt(long iOffset,
int iValue) |
void |
writeLong(long iOffset,
long iValue) |
public static final String NAME
public static final int HEADER_SIZE
public static final int VERSION_OFFSET
public OFileClassic(Path osFile, int pageSize)
public long allocateSpace(int size)
throws IOException
IOExceptionpublic void shrink(long size)
throws IOException
IOExceptionpublic long getFileSize()
public void read(long offset,
byte[] iData,
int iLength,
int iArrayOffset)
throws IOException
IOExceptionpublic void read(long offset,
ByteBuffer buffer,
boolean throwOnEof)
throws IOException
IOExceptionpublic void read(long offset,
ByteBuffer[] buffers,
boolean throwOnEof)
throws IOException
IOExceptionpublic void write(long offset,
ByteBuffer buffer)
throws IOException
IOExceptionpublic void write(long offset,
ByteBuffer[] buffers)
throws IOException
IOExceptionpublic void write(ArrayList<ORawPair<Long,ByteBuffer>> data, int maxScheduledWrites) throws IOException
IOExceptionpublic void write(long iOffset,
byte[] iData,
int iSize,
int iArrayOffset)
throws IOException
IOExceptionpublic void read(long iOffset,
byte[] iDestBuffer,
int iLength)
throws IOException
IOExceptionpublic int readInt(long iOffset)
throws IOException
IOExceptionpublic long readLong(long iOffset)
throws IOException
IOExceptionpublic void writeInt(long iOffset,
int iValue)
throws IOException
IOExceptionpublic void writeLong(long iOffset,
long iValue)
throws IOException
IOExceptionpublic void writeByte(long iOffset,
byte iValue)
throws IOException
IOExceptionpublic void write(long iOffset,
byte[] iSourceBuffer)
throws IOException
IOExceptionpublic void synch()
public void create()
throws IOException
IOExceptionpublic void open()
open in interface OClosableItempublic void close()
close in interface OClosableItempublic void delete()
throws IOException
IOExceptionpublic boolean isOpen()
isOpen in interface OClosableItempublic boolean exists()
public String getName()
public String getPath()
public void renameTo(Path newFile) throws IOException
IOExceptionpublic void replaceContentWith(Path newContentFile) throws IOException
newContentFile - the new content file to replace the content with.IOExceptionCopyright © 2009–2025 OrientDB. All rights reserved.