Fixed issue with many button Packets.
This commit is contained in:
@@ -27,10 +27,10 @@ public class PacketValueConfig extends AppEngPacket
|
|||||||
|
|
||||||
// automatic.
|
// automatic.
|
||||||
public PacketValueConfig(ByteBuf stream) throws IOException {
|
public PacketValueConfig(ByteBuf stream) throws IOException {
|
||||||
DataInputStream dis = new DataInputStream( new ByteArrayInputStream( stream.array(), 0, stream.readableBytes() ) );
|
DataInputStream dis = new DataInputStream( new ByteArrayInputStream( stream.array(), stream.readerIndex(), stream.readableBytes() ) );
|
||||||
Name = dis.readUTF();
|
Name = dis.readUTF();
|
||||||
Value = dis.readUTF();
|
Value = dis.readUTF();
|
||||||
dis.close();
|
// dis.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -89,9 +89,9 @@ public class PacketValueConfig extends AppEngPacket
|
|||||||
|
|
||||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
DataOutputStream dos = new DataOutputStream( bos );
|
DataOutputStream dos = new DataOutputStream( bos );
|
||||||
data.writeBytes( Name.getBytes() );
|
dos.writeUTF( Name );
|
||||||
data.writeBytes( Value.getBytes() );
|
dos.writeUTF( Value );
|
||||||
dos.close();
|
// dos.close();
|
||||||
|
|
||||||
data.writeBytes( bos.toByteArray() );
|
data.writeBytes( bos.toByteArray() );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user