public void writeObject(ByteBuffer buffer, Object object) throws IOException { String string = (String)object; writeString(string, buffer); } }
public void writeObject(ByteBuffer buffer, Object object) throws IOException { // Add the null/non-null marker buffer.put( (byte)(object != null ? 0x1 : 0x0) ); if (object == null) { // Nothing left to do return; } DisconnectMessage msg = (DisconnectMessage)object; StringSerializer.writeString( msg.reason, buffer ); StringSerializer.writeString( msg.type, buffer ); } }
public void writeObject(ByteBuffer buffer, Object object) throws IOException { // Add the null/non-null marker buffer.put( (byte)(object != null ? 0x1 : 0x0) ); if (object == null) { // Nothing left to do return; } ClientRegistrationMessage msg = (ClientRegistrationMessage)object; StringSerializer.writeString( msg.gameName, buffer ); buffer.putLong(msg.id); buffer.putInt(msg.version); } }
public void writeObject(ByteBuffer buffer, Object object) throws IOException { String string = (String)object; writeString(string, buffer); } }
public void writeObject(ByteBuffer buffer, Object object) throws IOException { // Add the null/non-null marker buffer.put( (byte)(object != null ? 0x1 : 0x0) ); if (object == null) { // Nothing left to do return; } DisconnectMessage msg = (DisconnectMessage)object; StringSerializer.writeString( msg.reason, buffer ); StringSerializer.writeString( msg.type, buffer ); } }
public void writeObject(ByteBuffer buffer, Object object) throws IOException { // Add the null/non-null marker buffer.put( (byte)(object != null ? 0x1 : 0x0) ); if (object == null) { // Nothing left to do return; } ClientRegistrationMessage msg = (ClientRegistrationMessage)object; StringSerializer.writeString( msg.gameName, buffer ); buffer.putLong(msg.id); buffer.putInt(msg.version); } }