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[]>,CodecWriter<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) voidvoidwrite(io.netty.buffer.ByteBuf buffer, long[] object) Writes an object to a type to a ByteBuf.static voidwriteFixedLength(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:ByteBufReaderReads 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:ByteBufWriterWrites 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) -
write
- Specified by:
writein interfaceCodecWriter<long[]>- Overrides:
writein classType<long[]>
-