public class TLVInputStream extends InputStream
| Modifier and Type | Field and Description |
|---|---|
static int |
TLV16_HEADER_LENGTH |
static int |
TLV8_HEADER_LENGTH |
| Constructor and Description |
|---|
TLVInputStream(InputStream stream)
Creates a TLVInputStream that uses the specified underlying InputStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this input stream and releases any system resources associated with the stream.
|
boolean |
hasNextElement()
Checks if stream contains bytes to read.
|
int |
read()
Reads the next byte of data from this input stream.
|
TLVElement |
readElement()
Reads the next TLV element from the stream.
|
available, mark, markSupported, read, read, reset, skippublic static final int TLV16_HEADER_LENGTH
public static final int TLV8_HEADER_LENGTH
public TLVInputStream(InputStream stream) throws TLVParserException
DataInputStream.stream - the specified input stream to use, not null.TLVParserException - when input stream is null.public TLVElement readElement() throws IOException, TLVParserException
TLVElement.IOException - when reading from underlying stream fails.TLVParserException - when input stream is null.public boolean hasNextElement()
throws IOException
IOException - when reading from underlying stream fails.public int read()
throws IOException
read in class InputStream-1 if there is
no more data because the end of the stream has been reached.IOException - when reading from underlying stream fails.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException - if an I/O error occurs.Copyright © 2024 Guardtime. All rights reserved.