Interface BinaryTagType<T extends BinaryTag>
- Type Parameters:
T- the tag type
- All Superinterfaces:
Predicate<BinaryTagType<? extends BinaryTag>>
public sealed interface BinaryTagType<T extends BinaryTag>
extends Predicate<BinaryTagType<? extends BinaryTag>>
A binary tag type.
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBinaryTagType.Reader<T extends BinaryTag>A binary tag reader.static interfaceBinaryTagType.Writer<T extends BinaryTag>A binary tag writer. -
Method Summary
Modifier and TypeMethodDescriptionstatic BinaryTagType<? extends BinaryTag> binaryTagType(byte id) Returns the binary tag type for the given id.byteid()Gets the id.booleannumeric()If this tag type is numeric.Reads a tag.voidwrite(T tag, DataOutput output) Writes a tag.
-
Method Details
-
binaryTagType
Returns the binary tag type for the given id.- Parameters:
id- the id- Returns:
- the binary tag type
- Since:
- 4.0.0
-
id
byte id()Gets the id.- Returns:
- the id
- Since:
- 4.0.0
-
numeric
boolean numeric()If this tag type is numeric.- Returns:
- if this tag type numeric
- Since:
- 4.0.0
-
read
Reads a tag.- Parameters:
input- the input- Returns:
- the tag
- Throws:
IOException- if an exception was encountered while reading- Since:
- 4.0.0
-
write
Writes a tag.- Parameters:
tag- the tagoutput- the output- Throws:
IOException- if an exception was encountered while writing- Since:
- 4.0.0
-