Package net.kyori.adventure.nbt
Class TagStringIO
java.lang.Object
net.kyori.adventure.nbt.TagStringIO
public final class TagStringIO extends Object
A holder for string tag format options.
- Since:
- 4.0.0
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTagStringIO.BuilderBuilder for a SNBT I/O handler. -
Method Summary
Modifier and Type Method Description CompoundBinaryTagasCompound(String input)Read the string into a compound tag structure.StringasString(CompoundBinaryTag input)Get a string representation of the provided tag.static @NonNull TagStringIO.Builderbuilder()Create an new builder to configure IO.static @NonNull TagStringIOget()Get an instance ofTagStringIOthat creates reads and writes using standard options.voidtoWriter(CompoundBinaryTag input, Writer dest)Writes a tag to in string format.
-
Method Details
-
get
Get an instance ofTagStringIOthat creates reads and writes using standard options.- Returns:
- the basic instance
- Since:
- 4.0.0
-
builder
Create an new builder to configure IO.- Returns:
- a builder
- Since:
- 4.0.0
-
asCompound
Read the string into a compound tag structure.- Parameters:
input- Input data- Returns:
- this
- Throws:
IOException- on any syntax errors- Since:
- 4.0.0
-
asString
Get a string representation of the provided tag.- Parameters:
input- tag to serialize- Returns:
- serialized form
- Throws:
IOException- if any errors occur writing to string- Since:
- 4.0.0
-
toWriter
Writes a tag to in string format.The provided
Writerwill remain open after reading a tag.- Parameters:
input- Tag to writedest- Writer to write to- Throws:
IOException- if any IO or syntax errors occur while parsing- Since:
- 4.0.0
-