Class BinaryEncoding.FromHex
java.lang.Object
java.io.InputStream
org.apache.sis.internal.sql.feature.BinaryEncoding.FromHex
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- BinaryEncoding
An input stream which converts hexadecimal string on-the-fly.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InputStream
The input stream providing hexadecimal digits. -
Constructor Summary
ConstructorsConstructorDescriptionFromHex
(InputStream source) Creates a new input stream which will decode the given source. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns an estimate of the number of bytes that can be read.void
close()
Closes this input stream.void
mark
(int n) Marks the current position in this input stream.boolean
Tests if this input stream supports the mark and reset methods.int
read()
Returns the next decoded byte.void
reset()
Repositions this stream to the position of the mark.long
skip
(long n) Skips over and discards n bytes of data.Methods inherited from class java.io.InputStream
nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
source
The input stream providing hexadecimal digits.
-
-
Constructor Details
-
FromHex
FromHex(InputStream source) Creates a new input stream which will decode the given source.
-
-
Method Details
-
read
Returns the next decoded byte.- Specified by:
read
in classInputStream
- Throws:
IOException
-
skip
Skips over and discards n bytes of data.- Overrides:
skip
in classInputStream
- Throws:
IOException
-
available
Returns an estimate of the number of bytes that can be read.- Overrides:
available
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()Tests if this input stream supports the mark and reset methods.- Overrides:
markSupported
in classInputStream
-
mark
public void mark(int n) Marks the current position in this input stream.- Overrides:
mark
in classInputStream
-
reset
Repositions this stream to the position of the mark.- Overrides:
reset
in classInputStream
- Throws:
IOException
-
close
Closes this input stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-