Java Code Examples for protocolsupport.protocol.serializer.MiscSerializer#readAllBytesSlice()

The following examples show how to use protocolsupport.protocol.serializer.MiscSerializer#readAllBytesSlice() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoginCustomPayload.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
protected void readClientData(ByteBuf clientdata) {
	id = VarNumberSerializer.readVarInt(clientdata);
	if (clientdata.readBoolean()) {
		data = MiscSerializer.readAllBytesSlice(clientdata, 1048576);
	} else {
		data = null;
	}
}
 
Example 2
Source File: CustomPayload.java    From ProtocolSupport with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
protected void readClientData(ByteBuf clientdata) {
	tag = StringSerializer.readVarIntUTF8String(clientdata, 20);
	data = MiscSerializer.readAllBytesSlice(clientdata, Short.MAX_VALUE);
}
 
Example 3
Source File: CustomPayload.java    From ProtocolSupport with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
protected void readClientData(ByteBuf clientdata) {
	tag = StringSerializer.readVarIntUTF8String(clientdata, Short.MAX_VALUE);
	data = MiscSerializer.readAllBytesSlice(clientdata);
}
 
Example 4
Source File: MiddleLoginCustomPayload.java    From ProtocolSupport with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
protected void readServerData(ByteBuf serverdata) {
	id = VarNumberSerializer.readVarInt(serverdata);
	tag = StringSerializer.readVarIntUTF8String(serverdata);
	data = MiscSerializer.readAllBytesSlice(serverdata);
}
 
Example 5
Source File: MiddleLookAt.java    From ProtocolSupport with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
protected void readServerData(ByteBuf serverdata) {
	data = MiscSerializer.readAllBytesSlice(serverdata);
}
 
Example 6
Source File: MiddleDeclareCommands.java    From ProtocolSupport with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
protected void readServerData(ByteBuf serverdata) {
	data = MiscSerializer.readAllBytesSlice(serverdata);
}
 
Example 7
Source File: MiddleQueryNBTResponse.java    From ProtocolSupport with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
protected void readServerData(ByteBuf serverdata) {
	data = MiscSerializer.readAllBytesSlice(serverdata);
}