ByteArrayInputStream bais = new ByteArrayInputStream(sBuff.toString().getBytes());     XMLDecoder d = new XMLDecoder(bais); Object result = d.readObject();    receiveObject(result);
try { ByteArrayInputStream bais = new ByteArrayInputStream( sBuff.toString().getBytes());     XMLDecoder d = new XMLDecoder(bais); Object result = d.readObject();    receiveObject(result); } catch (Exception e) { System.err.println("Se fue a al carajo ........"); e.printStackTrace(System.err); }
	public void run()	{		StringBuffer sBuff=new StringBuffer();				//String rawPacket = "";		// Loop until live = false				//logger.debug("el descriptor de socket en el thread es:" + socket);		try {				while (live)			{								int c=0;																													c = in.read();			//	logger.debug("llego un antes del if " +c );				if(c==-1)				{					live=false;					connectionFailed();									}															if (c != XML_PACKAGE_DELIMITER)				{					//rawPacket += (char)c;					sBuff.append((char)c);									} else				{															//String trimPacket=rawPacket.trim();						//System.out.println("Se recibe el paquete \n"+trimPacket);						//System.out.println("se recibe un \n"+sBuff.toString());												ByteArrayInputStream bais = new ByteArrayInputStream(sBuff.toString().getBytes());						//						StringReader sreader = new StringReader(sBuff.toString());//						StringBufferInputStream inputStream=new StringBufferInputStream(sBuff.toString());												XMLDecoder d = new XMLDecoder(bais);						Object result = d.readObject();												//inputStream.close();						//logger.debug("Se resive un objeto");						receiveObject(result);								sBuff=new StringBuffer();					//rawPacket = "";				}											}					} catch (IOException e) {			live=false;			connectionFailed();		}						}