public class StructReaderStream
extends java.lang.Object
| Constructor and Description |
|---|
StructReaderStream(java.io.InputStream is,
int elmsiz)
Create instance of StructReaderStream with 1000 number of structs in buffer.
|
StructReaderStream(java.io.InputStream is,
int elmsiz,
int noelm)
Create instance of StructReaderStream.
|
StructReaderStream(java.io.InputStream is,
int elmsiz,
int noelm,
long skip)
Create instance of StructReaderStream.
|
StructReaderStream(java.io.InputStream is,
int elmsiz,
long skip)
Create instance of StructReaderStream with 1000 number of structs in buffer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close underlying InputStream.
|
long |
getBytesRead()
Get numbers bytes read so far.
|
boolean |
more()
More records available.
|
<T> T |
read(java.lang.Class<T> t)
Read.
|
<T> T |
read(java.lang.Class<T> t,
LengthProvider2 lenpvd)
Read.
|
public StructReaderStream(java.io.InputStream is,
int elmsiz)
is - input streamelmsiz - fixed size structs: size struct, variable size structs: maximum size structpublic StructReaderStream(java.io.InputStream is,
int elmsiz,
long skip)
throws java.io.IOException
is - input streamelmsiz - fixed size structs: size struct, variable size structs: maximum size structskip - number bytes to skipjava.io.IOException - if IO error during skippingpublic StructReaderStream(java.io.InputStream is,
int elmsiz,
int noelm)
is - input streamelmsiz - fixed size structs: size struct, variable size structs: maximum size structnoelm - number of structs in bufferpublic StructReaderStream(java.io.InputStream is,
int elmsiz,
int noelm,
long skip)
throws java.io.IOException
is - input streamelmsiz - fixed size structs: size struct, variable size structs: maximum size structnoelm - number of structs in bufferskip - number bytes to skipjava.io.IOException - if IO error during skippingpublic <T> T read(java.lang.Class<T> t)
throws RecordException,
java.io.IOException
T - struct typet - class of what to readRecordException - if impossible to convert between types in class and structjava.io.IOException - if problem reading from input streampublic <T> T read(java.lang.Class<T> t,
LengthProvider2 lenpvd)
throws RecordException,
java.io.IOException
T - struct typet - class of what to readlenpvd - supplies length for fields where it is not given (null indicates that it is to be ignored)RecordException - if impossible to convert between types in class and structjava.io.IOException - if problem reading from input streampublic boolean more()
throws java.io.IOException
java.io.IOException - if problem reading from input streampublic void close()
throws java.io.IOException
java.io.IOException - if problem closing input streampublic long getBytesRead()