Class FloodgateFormatCodec
java.lang.Object
org.geysermc.floodgate.core.crypto.FloodgateFormatCodec
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]static final byte[]static final int -
Constructor Summary
ConstructorsConstructorDescriptionFloodgateFormatCodec(DataCodecType type, Topping topping, Path dataDirectory) -
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] data) decodeFromString(String data) decodeToString(byte[] data) byte[]encode(ByteBuffer data) byte[]encodeFromString(String data) voidvalidateHeader(byte[] data) Checks if the header is validstatic int
-
Field Details
-
VERSION
public static final int VERSION- See Also:
-
IDENTIFIER
public static final byte[] IDENTIFIER -
HEADER
public static final byte[] HEADER
-
-
Constructor Details
-
FloodgateFormatCodec
public FloodgateFormatCodec(DataCodecType type, Topping topping, @Named("dataDirectory") Path dataDirectory) throws IOException - Throws:
IOException
-
-
Method Details
-
version
-
encode
- Throws:
Exception
-
encodeFromString
- Throws:
Exception
-
decode
- Throws:
Exception
-
decodeToString
- Throws:
Exception
-
decodeFromString
- Throws:
Exception
-
validateHeader
Checks if the header is valid- Parameters:
data- the data to check- Throws:
InvalidFormatException- when the header is invalidUnsupportedVersionException
-