
public class OFileClassic extends Object implements OFile, OClosableItem
| Modifier and Type | Field and Description |
|---|---|
static int |
HEADER_SIZE |
static String |
NAME |
static int |
VERSION_OFFSET |
| Constructor and Description |
|---|
OFileClassic(String osFile,
String mode) |
| Modifier and Type | Method and Description |
|---|---|
long |
allocateSpace(long size) |
void |
close()
Closes the file.
|
void |
create()
Creates the file.
|
void |
delete()
Deletes the file.
|
boolean |
exists() |
String |
getAbsolutePath() |
long |
getFileSize() |
String |
getName() |
String |
getPath() |
boolean |
isOpen() |
void |
open()
Opens the file.
|
void |
read(long iOffset,
byte[] iDestBuffer,
int length) |
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) |
byte |
readByte(long iOffset) |
int |
readInt(long iOffset) |
long |
readLong(long iOffset) |
short |
readShort(long iOffset) |
boolean |
renameTo(File newFile) |
void |
shrink(long size)
Shrink the file content (filledUpTo attribute only)
|
boolean |
synch()
Synchronizes the buffered changes to disk.
|
String |
toString() |
void |
write(long iOffset,
byte[] iSourceBuffer) |
void |
write(long iOffset,
byte[] iData,
int iSize,
int iArrayOffset) |
void |
write(long offset,
ByteBuffer buffer) |
void |
writeByte(long iOffset,
byte iValue) |
void |
writeInt(long iOffset,
int iValue) |
void |
writeLong(long iOffset,
long iValue) |
void |
writeShort(long iOffset,
short iValue) |
public static final String NAME
public static final int HEADER_SIZE
public static final int VERSION_OFFSET
public long allocateSpace(long size)
throws IOException
allocateSpace in interface OFileIOExceptionpublic void shrink(long size)
throws IOException
OFileshrink in interface OFileIOExceptionpublic long getFileSize()
getFileSize in interface OFilepublic void read(long offset,
byte[] iData,
int iLength,
int iArrayOffset)
throws IOException
read in interface OFileIOExceptionpublic void read(long offset,
ByteBuffer buffer,
boolean throwOnEof)
throws IOException
read in interface OFileIOExceptionpublic void read(long offset,
ByteBuffer[] buffers,
boolean throwOnEof)
throws IOException
read in interface OFileIOExceptionpublic void write(long offset,
ByteBuffer buffer)
throws IOException
write in interface OFileIOExceptionpublic void write(long iOffset,
byte[] iData,
int iSize,
int iArrayOffset)
throws IOException
write in interface OFileIOExceptionpublic void read(long iOffset,
byte[] iDestBuffer,
int length)
throws IOException
read in interface OFileIOExceptionpublic int readInt(long iOffset)
throws IOException
readInt in interface OFileIOExceptionpublic long readLong(long iOffset)
throws IOException
readLong in interface OFileIOExceptionpublic short readShort(long iOffset)
throws IOException
readShort in interface OFileIOExceptionpublic byte readByte(long iOffset)
throws IOException
readByte in interface OFileIOExceptionpublic void writeInt(long iOffset,
int iValue)
throws IOException
writeInt in interface OFileIOExceptionpublic void writeLong(long iOffset,
long iValue)
throws IOException
writeLong in interface OFileIOExceptionpublic void writeShort(long iOffset,
short iValue)
throws IOException
writeShort in interface OFileIOExceptionpublic void writeByte(long iOffset,
byte iValue)
throws IOException
writeByte in interface OFileIOExceptionpublic void write(long iOffset,
byte[] iSourceBuffer)
throws IOException
write in interface OFileIOExceptionpublic boolean synch()
throws IOException
synch in interface OFileIOExceptionpublic void create()
throws IOException
OFilecreate in interface OFileIOExceptionpublic void open()
OFileopen in interface OClosableItemopen in interface OFilepublic void close()
OFileclose in interface OClosableItemclose in interface OFilepublic void delete()
throws IOException
OFiledelete in interface OFileIOExceptionpublic boolean isOpen()
isOpen in interface OClosableItemisOpen in interface OFilepublic String getAbsolutePath()
getAbsolutePath in interface OFilepublic boolean renameTo(File newFile) throws IOException
renameTo in interface OFileIOExceptionCopyright © 2009–2025 OrientDB. All rights reserved.