public class TLVInputStream
extends java.io.InputStream
| Constructor and Description |
|---|
TLVInputStream(java.io.InputStream inputStream)
Constructs a new TLV stream based on another stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns an estimate of the number of bytes that can be read (or
skipped over) from this input-stream without blocking by the next
invocation of a method for this input-stream.
|
void |
close()
Closes this input-stream.
|
void |
mark(int readLimit)
Marks the underlying input-stream if supported.
|
boolean |
markSupported()
Whether marking and resetting are supported.
|
int |
read()
Reads the next byte of data from the input-stream.
|
int |
readLength()
Reads a length.
|
int |
readTag()
Reads a tag.
|
byte[] |
readValue()
Reads a value.
|
void |
reset()
Resets the underlying input-stream if supported.
|
long |
skip(long n)
Attempts to skip over
n bytes. |
void |
skipToTag(int searchTag)
Skips in this stream until a given tag is found (depth first).
|
java.lang.String |
toString() |
public TLVInputStream(java.io.InputStream inputStream)
inputStream - a TLV objectpublic int readTag()
throws java.io.IOException
java.io.IOException - if reading goes wrongpublic int readLength()
throws java.io.IOException
java.io.IOException - if reading goes wrongpublic byte[] readValue()
throws java.io.IOException
java.io.IOException - if reading goes wrongpublic void skipToTag(int searchTag)
throws java.io.IOException
searchTag - the tag to search forjava.io.IOException - on errorpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException - if something goes wrongpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - if reading goes wrongpublic long skip(long n)
throws java.io.IOException
n bytes.skip in class java.io.InputStreamjava.io.IOException - if something goes wrongpublic void mark(int readLimit)
mark in class java.io.InputStreamreadLimit - limit for markingpublic boolean markSupported()
markSupported in class java.io.InputStreampublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOException - if something goes wrongpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException - if something goes wrongpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2023. All rights reserved.