EncryptedLOBFile
class LOBFile
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
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 | Description |
---|---|
LOBFile(StorageFile lobFile) |
Constructs LOBFile.
|
Modifier and Type | Method | Description |
---|---|---|
(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.
|
private final StorageFile storageFile
private final StorageRandomAccessFile randomAccessFile
storageFile
.LOBFile(StorageFile lobFile) throws java.io.FileNotFoundException
lobFile
- StorageFile object for which the file will be createdjava.io.FileNotFoundException
- if the file exists but is a directory or
cannot be openedStorageFile getStorageFile()
StorageFile
which represents the file where the
contents of the LOB are stored.StorageFile
instancelong length() throws java.io.IOException
java.io.IOException
- if an I/O error occursvoid seek(long pos) throws java.io.IOException
pos
- new positionjava.io.IOException
- if an I/O error occursvoid write(int b) throws java.io.IOException, StandardException
b
- int value of the bytejava.io.IOException
- if an I/O error occursStandardException
- it won't be thrown, it's in signature to allow
subclasses to throw StandardExceptionlong getFilePointer() throws java.io.IOException
java.io.IOException
- if an I/O error occursvoid 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 writtenjava.io.IOException
- if an I/O error occursStandardException
- it won't be thrown, it's in signature to allow
subclasses to throw StandardExceptionint readByte() throws java.io.IOException, StandardException
java.io.IOException
- if disk operation failsStandardException
- it won't be thrown, it's in signature to allow
subclasses to throw StandardExceptionint read(byte[] buff, int off, int len) throws java.io.IOException, StandardException
buff
- bufferoff
- starting position of bufferlen
- number of bytesjava.io.IOException
- if an I/O error occursStandardException
- it won't be thrown, it's in signature to allow
subclasses to throw StandardExceptionvoid close() throws java.io.IOException
java.io.IOException
- if an I/O error occursStandardException
- it won't be thrown, it's in signature to allow
subclasses to throw StandardExceptionvoid setLength(long size) throws java.io.IOException, StandardException
size
- new sizejava.io.IOException
- if an I/O error occursStandardException
- it won't be thrown, it's in signature to allow
subclasses to throw StandardExceptionvoid write(byte[] buf) throws java.io.IOException, StandardException
buf
- buffer to writejava.io.IOException
- if an I/O error occursStandardException
- it won't be thrown, it's in signature to allow
subclasses to throw StandardExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.