asgaard.utils.encode
Class HexDecInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--asgaard.utils.encode.CodedInputStream
|
+--asgaard.utils.encode.HexDecInputStream
- public class HexDecInputStream
- extends CodedInputStream
Converts ASCII-HEX-String in bytes.
Method Summary |
int |
available()
Returns the number of bytes that can be read from this input stream without blocking. |
java.lang.String |
getCoded()
Dummy |
void |
mark(int readlimit)
Marks the current position in this input stream. |
boolean |
markSupported()
Tests if this input stream supports the mark and reset methods (TRUE). |
int |
read()
Reads the next byte of data from this input stream. |
void |
reset()
Repositions this stream to the position at the time the mark method was last
called on this input stream. |
long |
skip(long n)
Skips over and discards n bytes of data from this input stream. |
void |
writeBuffer(java.lang.String s)
sets a HEX-ASCII-String to buf |
Methods inherited from class java.io.InputStream |
close,
read,
read |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
HexDecInputStream
public HexDecInputStream()
writeBuffer
public void writeBuffer(java.lang.String s)
- sets a HEX-ASCII-String to buf
- Overrides:
- writeBuffer in class CodedInputStream
getCoded
public java.lang.String getCoded()
- Dummy
- Overrides:
- getCoded in class CodedInputStream
available
public int available()
throws java.io.IOException
- Returns the number of bytes that can be read from this input stream without blocking.
- Overrides:
- available in class java.io.InputStream
read
public int read()
throws java.io.IOException
- Reads the next byte of data from this input stream. The value byte is returned
as an int in the range 0 to 255. If no byte is available because the end of the
stream has been reached, the value -1 is returned.
- Overrides:
- read in class java.io.InputStream
skip
public long skip(long n)
throws java.io.IOException
- Skips over and discards n bytes of data from this input stream. The skip method may,
for a variety of reasons, end up skipping over some smaller number of
bytes, possibly 0. The actual number of bytes skipped is returned.
- Parameters:
n
- the number of bytes to be skipped.- Returns:
- the actual number of bytes skipped.
- Overrides:
- skip in class java.io.InputStream
mark
public void mark(int readlimit)
- Marks the current position in this input stream. A subsequent call to the reset
method repositions this stream at the last marked position so that subsequent
reads re-read the same bytes.
- Overrides:
- mark in class java.io.InputStream
reset
public void reset()
throws java.io.IOException
- Repositions this stream to the position at the time the mark method was last
called on this input stream.
- Overrides:
- reset in class java.io.InputStream
markSupported
public boolean markSupported()
- Tests if this input stream supports the mark and reset methods (TRUE).
- Overrides:
- markSupported in class java.io.InputStream