public StompFrame apply() throws IOException { Buffer content = readUntil((byte) 0); if (content != null) { nextDecodeAction = read_action; frame.setContent(BufferSupport.chomp(content).getBytes()); return frame; } else { return null; } } };
public StompFrame apply() throws IOException { Buffer content = readUntil((byte) 0); if (content != null) { nextDecodeAction = read_action; frame.setContent(BufferSupport.chomp(content).getBytes()); return frame; } else { return null; } } };
public StompFrame apply() throws IOException { Buffer content = readBytes(contentLength + 1); if (content != null) { if (content.getByte(contentLength) != 0) { throw new IOException("Expected null terminator after " + contentLength + " content bytes"); } frame.setContent(BufferSupport.chomp(content).getBytes()); nextDecodeAction = read_action; return frame; } else { return null; } } };
public StompFrame apply() throws IOException { Buffer content = readBytes(contentLength + 1); if (content != null) { if (content.getByte(contentLength) != 0) { throw new IOException("Expected null terminator after " + contentLength + " content bytes"); } frame.setContent(BufferSupport.chomp(content).getBytes()); nextDecodeAction = read_action; return frame; } else { return null; } } };
public StompFrame convertMessage(ProtocolConverter converter, ActiveMQMessage message) throws IOException, JMSException { StompFrame command = new StompFrame(); command.setAction(Stomp.Responses.MESSAGE); Map<String, String> headers = new HashMap<String, String>(25); command.setHeaders(headers); FrameTranslator.Helper.copyStandardHeadersFromMessageToFrame(converter, message, command, this); if (message.getDataStructureType() == ActiveMQTextMessage.DATA_STRUCTURE_TYPE) { ActiveMQTextMessage msg = (ActiveMQTextMessage)message.copy(); command.setContent(msg.getText().getBytes("UTF-8")); } else if (message.getDataStructureType() == ActiveMQBytesMessage.DATA_STRUCTURE_TYPE) { ActiveMQBytesMessage msg = (ActiveMQBytesMessage)message.copy(); msg.setReadOnlyBody(true); byte[] data = new byte[(int)msg.getBodyLength()]; msg.readBytes(data); headers.put(Stomp.Headers.CONTENT_LENGTH, "" + data.length); command.setContent(data); } else if (message.getDataStructureType() == ActiveMQMessage.DATA_STRUCTURE_TYPE && AdvisorySupport.ADIVSORY_MESSAGE_TYPE.equals(message.getType())) { FrameTranslator.Helper.copyStandardHeadersFromMessageToFrame( converter, message, command, this); String body = marshallAdvisory(message.getDataStructure()); command.setContent(body.getBytes("UTF-8")); } return command; }
command.setContent(marshall(msg.getObject(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(marshall((Serializable) msg.getContentMap(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(body.getBytes("UTF-8"));
command.setContent(marshall(msg.getObject(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(marshall((Serializable) msg.getContentMap(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(body.getBytes("UTF-8"));
command.setContent(marshall(msg.getObject(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(marshall((Serializable) msg.getContentMap(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(body.getBytes("UTF-8"));
command.setContent(marshall(msg.getObject(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(marshall((Serializable) msg.getContentMap(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(body.getBytes("UTF-8"));
command.setContent(marshall(msg.getObject(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(marshall((Serializable) msg.getContentMap(), headers.get(Headers.TRANSFORMATION)).getBytes("UTF-8")); command.setContent(body.getBytes("UTF-8"));
byte[] content = new byte[msgContent.getLength() - 4]; System.arraycopy(msgContent.data, 4, content, 0, content.length); command.setContent(content); String messageText = msg.getText(); if (messageText != null) { command.setContent(msg.getText().getBytes("UTF-8")); command.setContent(data);
byte[] content = new byte[msgContent.getLength() - 4]; System.arraycopy(msgContent.data, 4, content, 0, content.length); command.setContent(content); String messageText = msg.getText(); if (messageText != null) { command.setContent(msg.getText().getBytes("UTF-8")); command.setContent(data);
byte[] content = new byte[msgContent.getLength() - 4]; System.arraycopy(msgContent.data, 4, content, 0, content.length); command.setContent(content); String messageText = msg.getText(); if (messageText != null) { command.setContent(msg.getText().getBytes("UTF-8")); command.setContent(data);
byte[] content = new byte[msgContent.getLength() - 4]; System.arraycopy(msgContent.data, 4, content, 0, content.length); command.setContent(content); String messageText = msg.getText(); if (messageText != null) { command.setContent(msg.getText().getBytes("UTF-8")); command.setContent(data);
byte[] content = new byte[msgContent.getLength() - 4]; System.arraycopy(msgContent.data, 4, content, 0, content.length); command.setContent(content); String messageText = msg.getText(); if (messageText != null) { command.setContent(msg.getText().getBytes("UTF-8")); command.setContent(data);
command.setContent(marshall(msg.getObject(), headers.get(Stomp.Headers.TRANSFORMATION)) .getBytes("UTF-8")); command.setContent(marshall((Serializable)msg.getContentMap(), headers.get(Stomp.Headers.TRANSFORMATION)) .getBytes("UTF-8")); command.setContent(body.getBytes("UTF-8")); return command; } else {