Package org.exist.debuggee

Examples of org.exist.debuggee.Packet


*/
public class ResponseEncoder extends ProtocolEncoderAdapter {

  public void encode(IoSession session, Object message, ProtocolEncoderOutput out)
      throws Exception {
    Packet packet = (Packet) message;

    byte[] response = packet.commandBytes();
   
    IoBuffer buffer = IoBuffer.allocate(response.length+1, false);
    buffer.put(response);
    buffer.put((byte)0);
    buffer.flip();
View Full Code Here


public class ResponseEncoder extends ProtocolEncoderAdapter {

    private final static Logger LOG = Logger.getLogger(ResponseEncoder.class);

  public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception {
    Packet packet = (Packet) message;
   
    byte[] response = packet.responseBytes();
    String length = String.valueOf(response.length);

    if (LOG.isDebugEnabled())
      LOG.debug("" + length + " byte(s) : " + packet.toString());
   
    IoBuffer buffer = IoBuffer.allocate(response.length+length.length()+2, false);
    buffer.put(length.getBytes());
    buffer.put((byte)0);
    buffer.put(response);
View Full Code Here

TOP

Related Classes of org.exist.debuggee.Packet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.