public class PDBFile4D extends Stream
Modifier and Type | Field and Description |
---|---|
static int |
CREATE |
static int |
CREATE_EMPTY |
static int |
DB_ATTR_APPINFODIRTY |
static int |
DB_ATTR_BACKUP |
static int |
DB_ATTR_COPY_PREVENTION |
static int |
DB_ATTR_OK_TO_INSTALL_NEWER |
static int |
DB_ATTR_READ_ONLY |
static int |
DB_ATTR_RESET_AFTER_INSTALL |
static int |
DB_ATTR_STREAM |
static int |
READ_WRITE |
static byte |
REC_ATTR_DELETE |
static byte |
REC_ATTR_DIRTY |
static byte |
REC_ATTR_SECRET |
static byte |
REC_RELEASE |
skipBuffer
Constructor and Description |
---|
PDBFile4D(java.lang.String name,
int mode) |
Modifier and Type | Method and Description |
---|---|
void |
addRecord(int size) |
void |
addRecord(int size,
int pos) |
void |
close()
Closes this I/O connection, releasing any associated resources.
|
void |
delete() |
void |
deleteRecord() |
protected void |
finalize() |
int |
getAttributes() |
java.lang.String |
getName() |
byte |
getRecordAttributes(int recordPos) |
int |
getRecordCount() |
int |
getRecordOffset() |
int |
getRecordPos() |
int |
getRecordSize() |
int |
inspectRecord(byte[] buf,
int recordPos,
int offsetInRec) |
static java.lang.String[] |
listPDBs() |
static java.lang.String[] |
listPDBs(int creatorId,
int type) |
int |
readBytes(byte[] buf,
int start,
int count)
Reads bytes from the stream.
|
void |
rename(java.lang.String newName) |
void |
resizeRecord(int size) |
int |
searchBytes(byte[] toSearch,
int length,
int offsetInRec) |
void |
setAttributes(int i) |
void |
setRecordAttributes(int recordPos,
byte attr) |
void |
setRecordOffset(int ofs) |
void |
setRecordPos(int pos) |
int |
skipBytes(int count)
Skips over and discards n bytes of data from this stream.
|
int |
writeBytes(byte[] buf,
int start,
int count)
Writes bytes to the stream.
|
asInputStream, asOutputStream, asStream, asStream, wrapInputStream, wrapInputStreamToStream, write, writeBytes, writeBytes, writeBytes
public static final int READ_WRITE
public static final int CREATE
public static final int CREATE_EMPTY
public static final int DB_ATTR_READ_ONLY
public static final int DB_ATTR_APPINFODIRTY
public static final int DB_ATTR_BACKUP
public static final int DB_ATTR_OK_TO_INSTALL_NEWER
public static final int DB_ATTR_RESET_AFTER_INSTALL
public static final int DB_ATTR_COPY_PREVENTION
public static final int DB_ATTR_STREAM
public static final byte REC_RELEASE
public static final byte REC_ATTR_DELETE
public static final byte REC_ATTR_DIRTY
public static final byte REC_ATTR_SECRET
public PDBFile4D(java.lang.String name, int mode) throws IllegalArgumentIOException, FileNotFoundException, IOException
public java.lang.String getName()
public void setRecordOffset(int ofs) throws IllegalArgumentIOException, IOException
public int getRecordOffset() throws IOException
IOException
public int skipBytes(int count) throws IllegalArgumentIOException, IOException
Stream
skipBytes
in class Stream
count
- the number of bytes to be skipped.IOException
- if the stream does not support skip, or if some other I/O error occurs.IllegalArgumentIOException
public int getRecordSize() throws IOException
IOException
public final int getRecordPos() throws IOException
IOException
public void close() throws IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
IOException
- If an I/O error occurs.public final int readBytes(byte[] buf, int start, int count) throws IOException
Stream
readBytes
in class Stream
buf
- the byte array to read data intostart
- the start position in the arraycount
- the number of bytes to readIOException
public final int writeBytes(byte[] buf, int start, int count) throws IOException
Stream
IOException
if an error prevented the write
operation from occurring.writeBytes
in class Stream
buf
- the byte array to write data fromstart
- the start position in the byte arraycount
- the number of bytes to writeIOException
public static java.lang.String[] listPDBs()
public void rename(java.lang.String newName) throws IllegalArgumentIOException, IOException
public void addRecord(int size) throws IllegalArgumentIOException, IOException
public void addRecord(int size, int pos) throws IllegalArgumentIOException, IOException
public void resizeRecord(int size) throws IllegalArgumentIOException, IOException
public void delete() throws IOException
IOException
public static java.lang.String[] listPDBs(int creatorId, int type)
public void deleteRecord() throws IOException
IOException
public int getRecordCount() throws IOException
IOException
public void setRecordPos(int pos) throws IllegalArgumentIOException, IOException
public int inspectRecord(byte[] buf, int recordPos, int offsetInRec) throws IllegalArgumentIOException, IOException
public byte getRecordAttributes(int recordPos) throws IOException
IOException
public void setRecordAttributes(int recordPos, byte attr) throws IOException
IOException
public int getAttributes() throws IOException
IOException
public void setAttributes(int i) throws IOException
IOException
public int searchBytes(byte[] toSearch, int length, int offsetInRec) throws IOException
IOException
protected void finalize()
finalize
in class java.lang.Object