@Override public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame)command; if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { os.write(Stomp.BREAK); return; } StringBuilder builder = new StringBuilder(); os.write(marshalHeaders(stomp, builder).toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
@Override public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame)command; if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { os.write(Stomp.BREAK); return; } StringBuilder builder = new StringBuilder(); os.write(marshalHeaders(stomp, builder).toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
@Override public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame)command; if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { os.write(Stomp.BREAK); return; } StringBuilder builder = new StringBuilder(); os.write(marshalHeaders(stomp, builder).toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
public String marshalToString(StompFrame stomp) throws IOException { if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { return String.valueOf((char)Stomp.BREAK); } StringBuilder buffer = new StringBuilder(); marshalHeaders(stomp, buffer); if (stomp.getContent() != null) { String contentString = new String(stomp.getContent(), "UTF-8"); buffer.append(contentString); } buffer.append('\u0000'); return buffer.toString(); }
public String marshalToString(StompFrame stomp) throws IOException { if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { return String.valueOf((char)Stomp.BREAK); } StringBuilder buffer = new StringBuilder(); marshalHeaders(stomp, buffer); if (stomp.getContent() != null) { String contentString = new String(stomp.getContent(), "UTF-8"); buffer.append(contentString); } buffer.append('\u0000'); return buffer.toString(); }
public String marshalToString(StompFrame stomp) throws IOException { if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { return String.valueOf((char)Stomp.BREAK); } StringBuilder buffer = new StringBuilder(); marshalHeaders(stomp, buffer); if (stomp.getContent() != null) { String contentString = new String(stomp.getContent(), "UTF-8"); buffer.append(contentString); } buffer.append('\u0000'); return buffer.toString(); }