public interface CPInfoReader
CPInfo
s.
It's also used as a Service Provider Interface (SPI) for the same reason.
Modifier and Type | Method and Description |
---|---|
boolean |
isCPInfoReadingSupportedFor(int tag)
Returns
true if, and only if, this CPInfoReader supports reading a CPInfo given an int denoting a tag, false otherwise. |
CPInfo |
readCPInfo(java.io.DataInput dataInput,
int tag)
Returns a
CPInfo based on the data provided by dataInput . |
CPInfo readCPInfo(java.io.DataInput dataInput, int tag)
CPInfo
based on the data provided by dataInput
.
If dataInput
is null
, a NullPointerException
may be thrown. But no guarantees can be made.
If tag
is less than 0
, an IllegalArgumentException
may be thrown. But no guarantees can be made.
If the CPInfo
cannot be read, a NodeFormatException
should be thrown.
dataInput
- the DataInput
to read the data fromtag
- an int
denoting the tag for the CPInfo
we are about to readCPInfo
based on the data provided by dataInput
java.lang.IllegalArgumentException
- thrown if, and only if, tag
is less than 0
NodeFormatException
- thrown if, and only if, the CPInfo
cannot be readjava.lang.NullPointerException
- thrown if, and only if, dataInput
is null
boolean isCPInfoReadingSupportedFor(int tag)
true
if, and only if, this CPInfoReader
supports reading a CPInfo
given an int
denoting a tag, false
otherwise.
If tag
is less than 0
, an IllegalArgumentException
may be thrown. But no guarantees can be made.
tag
- an int
denoting the tag for the CPInfo
we are eventually about to readtrue
if, and only if, this CPInfoReader
supports reading a CPInfo
given an int
denoting a tag, false
otherwisejava.lang.IllegalArgumentException
- thrown if, and only if, tag
is less than 0