|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--waba.io.Stream
|
+--waba.io.ResizeStream
This class is used to create a resizable record. You can use it with DataStream. For example:
Catalog cat = new Catalog("Name.Crtr.Type",Catalog.CREATE);
ResizeStream rs = new ResizeStream(cat,512);
DataStream ds = new DataStream(rs);
rs.startRecord();
ds.writeStringArray(aStringArray);
rs.endRecord();
PS: if you dont call startRecord, writeBytes will simply call catalog.writeBytes and will not resize the record!
| Constructor Summary | |
ResizeStream(Catalog cat,
int initialSize)
Deprecated. Constructs the resize stream. |
|
| Method Summary | |
boolean |
close()
Deprecated. closes the catalog |
void |
endRecord()
Deprecated. must be called after the record is finished so it can be resized |
Stream |
getStream()
Deprecated. Returns the stream attached to this stream (which is always a Catalog. |
boolean |
isOpen()
Deprecated. Returns true if this Stream is open and false otherwise |
int |
readBytes(byte[] buf,
int start,
int count)
Deprecated. simply read the bytes from the associated catalog |
boolean |
restartRecord(int pos)
Deprecated. Restart writing to the given record pos. |
boolean |
startRecord()
Deprecated. add a new record to the catalog. |
boolean |
startRecord(int pos)
Deprecated. inserts the record at the specified index in the catalog. |
int |
writeBytes(byte[] buf,
int start,
int count)
Deprecated. writes to the buffer, growing the record if necessary. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ResizeStream(Catalog cat,
int initialSize)
cat - The catalog associatedinitialSize - The initial size of the record. CANNOT BE 0!| Method Detail |
public boolean startRecord(int pos)
throws IOError
public boolean startRecord()
throws IOError
public boolean restartRecord(int pos)
throws IOError
public void endRecord()
throws IOError
public int readBytes(byte[] buf,
int start,
int count)
buf - the byte array to read data intostart - the start position in the arraycount - the number of bytes to read
public int writeBytes(byte[] buf,
int start,
int count)
buf - the byte array to write data fromstart - the start position in the byte arraycount - the number of bytes to writepublic boolean close()
public boolean isOpen()
public Stream getStream()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||