superwaba.ext.xplat.io
Class RecordPipe
java.lang.Object
|
+--waba.io.Stream
|
+--superwaba.ext.xplat.io.RecordPipe
- public class RecordPipe
- extends Stream
Used to make a Catalog act as a single Stream, reading all records in sequence.
Note that it does not support writings.
|
Constructor Summary |
RecordPipe(Catalog cat,
int startRec,
int endRec,
int recordOffset)
|
|
Method Summary |
boolean |
close()
Closes the stream. |
boolean |
isOpen()
Returns true if this Stream is open and false otherwise |
int |
readBytes(byte[] buf,
int start,
int count)
Reads bytes from the stream. |
int |
writeBytes(byte[] buf,
int start,
int count)
Writes bytes to the stream. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
endRec
protected int endRec
cat
protected Catalog cat
recordOffset
protected int recordOffset
isOpen
protected boolean isOpen
recSize
protected int recSize
RecordPipe
public RecordPipe(Catalog cat,
int startRec,
int endRec,
int recordOffset)
isOpen
public boolean isOpen()
- Description copied from class: Stream
- Returns true if this Stream is open and false otherwise
- Overrides:
- isOpen in class Stream
close
public boolean close()
- Description copied from class: Stream
- Closes the stream. Returns true if the operation is successful
and false otherwise.
- Overrides:
- close in class Stream
writeBytes
public int writeBytes(byte[] buf,
int start,
int count)
- Description copied from class: Stream
- Writes bytes to the stream. Returns the
number of bytes actually written or -1 if an error prevented the
write operation from occurring.
- Overrides:
- writeBytes in class Stream
- Tags copied from class: Stream
- Parameters:
buf - the byte array to write data fromstart - the start position in the byte arraycount - the number of bytes to write
readBytes
public int readBytes(byte[] buf,
int start,
int count)
- Description copied from class: Stream
- Reads bytes from the stream. Returns the
number of bytes actually read or -1 if an error prevented the
read operation from occurring.
- Overrides:
- readBytes in class Stream
- Tags copied from class: Stream
- Parameters:
buf - the byte array to read data intostart - the start position in the arraycount - the number of bytes to read