Class LongArrayType
java.lang.Object
com.viaversion.viaversion.api.type.Type<long[]>
com.viaversion.viaversion.api.type.types.LongArrayType
- All Implemented Interfaces:
ByteBufReader<long[]>
,ByteBufWriter<long[]>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong[]
read
(io.netty.buffer.ByteBuf buffer) Reads a value from a ByteBuf.static long[]
readFixedLength
(io.netty.buffer.ByteBuf buffer, int expectedLength) void
write
(io.netty.buffer.ByteBuf buffer, long[] object) Writes an object to a type to a ByteBuf.static void
writeFixedLength
(io.netty.buffer.ByteBuf buffer, long[] object) Methods inherited from class com.viaversion.viaversion.api.type.Type
getBaseClass, getOutputClass, getTypeName, toString
-
Constructor Details
-
LongArrayType
public LongArrayType(int length) -
LongArrayType
public LongArrayType()
-
-
Method Details
-
read
public long[] read(io.netty.buffer.ByteBuf buffer) Description copied from interface:ByteBufReader
Reads a value from a ByteBuf.- Parameters:
buffer
- buffer to read from- Returns:
- type based on the class type
-
readFixedLength
public static long[] readFixedLength(io.netty.buffer.ByteBuf buffer, int expectedLength) -
write
public void write(io.netty.buffer.ByteBuf buffer, long[] object) Description copied from interface:ByteBufWriter
Writes an object to a type to a ByteBuf.- Parameters:
buffer
- buffer to write toobject
- value to write
-
writeFixedLength
public static void writeFixedLength(io.netty.buffer.ByteBuf buffer, long[] object)
-