final DataOutputStream dos2 = new DataOutputStream( cos );
final SerializerOutputStream out = new SerializerOutputStream( dos2 );
out.writeByte( VERSION );
out.writeByte( (byte) (encrypted ? 1 : 0) );
out.writeString( Net.getDeviceGuid() != null ? Net.getDeviceGuid() : "" );
out.writeLong( Net.getDeviceId() != null ? Net.getDeviceId().longValue() : 0 );
serialize( out );
final long crc = cos.getCRC();
out.writeString( "END_OF_DATA" );
out.writeLong( crc );
pe.setMessage( ResourceManager.getResource( "bm.net.rpc.WaitingResponse" ) );