protected int remaining(ByteArrayOutputStream buffer) { return datagramSize - buffer.size(); }
headerMarshaller.writeHeader(command, dataOut); int offset = writeBuffer.size();
protected int remaining(ByteArrayOutputStream buffer) { return datagramSize - buffer.size(); }
protected int remaining(ByteArrayOutputStream buffer) { return datagramSize - buffer.size(); }
protected int remaining(ByteArrayOutputStream buffer) { return datagramSize - buffer.size(); }
protected int remaining(ByteArrayOutputStream buffer) { return datagramSize - buffer.size(); }
httpMethod.addHeader("Content-Type", "application/x-gzip"); if (LOG.isTraceEnabled()) { LOG.trace("Sending compressed, size = " + bytes.length + ", compressed size = " + bytesOut.size());
httpMethod.addHeader("Content-Type", "application/x-gzip"); if (LOG.isTraceEnabled()) { LOG.trace("Sending compressed, size = " + bytes.length + ", compressed size = " + bytesOut.size());
httpMethod.addHeader("Content-Type", "application/x-gzip"); if (LOG.isTraceEnabled()) { LOG.trace("Sending compressed, size = " + bytes.length + ", compressed size = " + bytesOut.size());
private String readLine(DataInput in, int maxLength, String errorMessage) throws IOException { byte b; ByteArrayOutputStream baos = new ByteArrayOutputStream(maxLength); while ((b = in.readByte()) != '\n') { if (baos.size() > maxLength) { throw new ProtocolException(errorMessage, true); } baos.write(b); } baos.close(); ByteSequence sequence = baos.toByteSequence(); return new String(sequence.getData(), sequence.getOffset(), sequence.getLength(), "UTF-8"); }
private ByteSequence readHeaderLine(DataInput in, int maxLength, String errorMessage) throws IOException { byte b; ByteArrayOutputStream baos = new ByteArrayOutputStream(maxLength); while ((b = in.readByte()) != '\n') { if (baos.size() > maxLength) { baos.close(); throw new ProtocolException(errorMessage, true); } baos.write(b); } baos.close(); ByteSequence line = baos.toByteSequence(); if (stompVersion.equals(Stomp.V1_0) || stompVersion.equals(Stomp.V1_2)) { int lineLength = line.getLength(); if (lineLength > 0 && line.data[lineLength-1] == '\r') { line.setLength(lineLength-1); } } return line; }
private ByteSequence readHeaderLine(DataInput in, int maxLength, String errorMessage) throws IOException { byte b; ByteArrayOutputStream baos = new ByteArrayOutputStream(maxLength); while ((b = in.readByte()) != '\n') { if (baos.size() > maxLength) { baos.close(); throw new ProtocolException(errorMessage, true); } baos.write(b); } baos.close(); ByteSequence line = baos.toByteSequence(); if (stompVersion.equals(Stomp.V1_0) || stompVersion.equals(Stomp.V1_2)) { int lineLength = line.getLength(); if (lineLength > 0 && line.data[lineLength-1] == '\r') { line.setLength(lineLength-1); } } return line; }
private ByteSequence readHeaderLine(DataInput in, int maxLength, String errorMessage) throws IOException { byte b; ByteArrayOutputStream baos = new ByteArrayOutputStream(maxLength); while ((b = in.readByte()) != '\n') { if (baos.size() > maxLength) { baos.close(); throw new ProtocolException(errorMessage, true); } baos.write(b); } baos.close(); ByteSequence line = baos.toByteSequence(); if (stompVersion.equals(Stomp.V1_0) || stompVersion.equals(Stomp.V1_2)) { int lineLength = line.getLength(); if (lineLength > 0 && line.data[lineLength-1] == '\r') { line.setLength(lineLength-1); } } return line; }
private ByteSequence readHeaderLine(DataInput in, int maxLength, String errorMessage) throws IOException { byte b; ByteArrayOutputStream baos = new ByteArrayOutputStream(maxLength); while ((b = in.readByte()) != '\n') { if (baos.size() > maxLength) { baos.close(); throw new ProtocolException(errorMessage, true); } baos.write(b); } baos.close(); ByteSequence line = baos.toByteSequence(); if (stompVersion.equals(Stomp.V1_0) || stompVersion.equals(Stomp.V1_2)) { int lineLength = line.getLength(); if (lineLength > 0 && line.data[lineLength - 1] == '\r') { line.setLength(lineLength - 1); } } return line; }
private ByteSequence readHeaderLine(DataInput in, int maxLength, String errorMessage) throws IOException { byte b; ByteArrayOutputStream baos = new ByteArrayOutputStream(maxLength); while ((b = in.readByte()) != '\n') { if (baos.size() > maxLength) { baos.close(); throw new ProtocolException(errorMessage, true); } baos.write(b); } baos.close(); ByteSequence line = baos.toByteSequence(); if (stompVersion.equals(Stomp.V1_0) || stompVersion.equals(Stomp.V1_2)) { int lineLength = line.getLength(); if (lineLength > 0 && line.data[lineLength - 1] == '\r') { line.setLength(lineLength - 1); } } return line; }
} else if (baos.size() > MAX_DATA_LENGTH) { throw new ProtocolException("The maximum data length was exceeded", true);
} else if (baos.size() > MAX_DATA_LENGTH) { throw new ProtocolException("The maximum data length was exceeded", true);
if (baos == null) { baos = new ByteArrayOutputStream(); } else if (baos.size() > getMaxDataLength()) { throw new ProtocolException("The maximum data length was exceeded", true); } else {
if (baos == null) { baos = new ByteArrayOutputStream(); } else if (baos.size() > getMaxDataLength()) { throw new ProtocolException("The maximum data length was exceeded", true); } else {
} else if (baos.size() > MAX_DATA_LENGTH) { throw new ProtocolException("The maximum data length was exceeded", true);