|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.jdbc.LOBFile
class LOBFile
LOBFile is a wrapper over StorageRandomAccessFile. The purpose of this class is to let the user of this class access StorageRandomAccessFile in plain and in encrypted for without having to change code.
| Field Summary | |
|---|---|
private StorageRandomAccessFile |
randomAccessFile
An object giving random access to storageFile. |
private StorageFile |
storageFile
The temporary file where the contents of the LOB should be stored. |
| Constructor Summary | |
|---|---|
LOBFile(StorageFile lobFile)
Constructs LOBFile. |
|
| Method Summary | |
|---|---|
(package private) void |
close()
Closes the file. |
(package private) long |
getFilePointer()
Returns the current position of the file pointer. |
(package private) StorageFile |
getStorageFile()
Get the StorageFile which represents the file where the
contents of the LOB are stored. |
(package private) long |
length()
Returns length of the file. |
(package private) int |
read(byte[] buff,
int off,
int len)
Reads len number of bytes from the file starting from off position in the buffer. |
(package private) int |
readByte()
Reads one byte from file. |
(package private) void |
seek(long pos)
Sets the file pointer to a given position. |
(package private) void |
setLength(long size)
Sets the file length to a given size. |
(package private) void |
write(byte[] buf)
Writes a buffer completely into the file. |
(package private) void |
write(byte[] b,
int off,
int len)
Writes a segment of bytes into the file. |
(package private) void |
write(int b)
Writes one bytes into the file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final StorageFile storageFile
private final StorageRandomAccessFile randomAccessFile
storageFile.
| Constructor Detail |
|---|
LOBFile(StorageFile lobFile) throws java.io.FileNotFoundException
lobFile - StorageFile object for which the file will be created
java.io.FileNotFoundException - if the file exists but is a directory or
cannot be opened| Method Detail |
|---|
StorageFile getStorageFile()
StorageFile which represents the file where the
contents of the LOB are stored.
StorageFile instance
long length()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
void seek(long pos)
throws java.io.IOException
pos - new position
java.io.IOException - if an I/O error occurs
void write(int b)
throws java.io.IOException,
StandardException
b - int value of the byte
java.io.IOException - if an I/O error occurs
StandardException - it won't be thrown, it's in signature to allow
subclasses to throw StandardException
long getFilePointer()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
void write(byte[] b,
int off,
int len)
throws java.io.IOException,
StandardException
b - byte array containing bytes to write into the fileoff - starting position of segmentlen - number of bytes to be written
java.io.IOException - if an I/O error occurs
StandardException - it won't be thrown, it's in signature to allow
subclasses to throw StandardException
int readByte()
throws java.io.IOException,
StandardException
java.io.IOException - if disk operation fails
StandardException - it won't be thrown, it's in signature to allow
subclasses to throw StandardException
int read(byte[] buff,
int off,
int len)
throws java.io.IOException,
StandardException
buff - bufferoff - starting position of bufferlen - number of bytes
java.io.IOException - if an I/O error occurs
StandardException - it won't be thrown, it's in signature to allow
subclasses to throw StandardException
void close()
throws java.io.IOException
java.io.IOException - if an I/O error occurs
StandardException - it won't be thrown, it's in signature to allow
subclasses to throw StandardException
void setLength(long size)
throws java.io.IOException,
StandardException
size - new size
java.io.IOException - if an I/O error occurs
StandardException - it won't be thrown, it's in signature to allow
subclasses to throw StandardException
void write(byte[] buf)
throws java.io.IOException,
StandardException
buf - buffer to write
java.io.IOException - if an I/O error occurs
StandardException - it won't be thrown, it's in signature to allow
subclasses to throw StandardException
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||