@Override public Object unmarshal(DataInput dis) throws IOException { DataInput dataIn = dis; if (!sizePrefixDisabled) { int size = dis.readInt(); if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } // int size = dis.readInt(); // byte[] data = new byte[size]; // dis.readFully(data); // bytesIn.restart(data); // dataIn = bytesIn; } return doUnmarshal(dataIn); }
@Override public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }
private void validateFrameSize(int frameSize) throws IOException { long maxFrameSize = AmqpWireFormat.DEFAULT_MAX_FRAME_SIZE; if (wireFormat != null) { maxFrameSize = wireFormat.getMaxFrameSize(); } if (frameSize > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(frameSize, maxFrameSize); } }
private void validateFrameSize(int frameSize) throws IOException { long maxFrameSize = AmqpWireFormat.DEFAULT_MAX_FRAME_SIZE; if (wireFormat != null) { maxFrameSize = wireFormat.getMaxFrameSize(); } if (frameSize > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(frameSize, maxFrameSize); } }
@Override public Object unmarshal(DataInput dis) throws IOException { DataInput dataIn = dis; if (!sizePrefixDisabled) { int size = dis.readInt(); if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } // int size = dis.readInt(); // byte[] data = new byte[size]; // dis.readFully(data); // bytesIn.restart(data); // dataIn = bytesIn; } return doUnmarshal(dataIn); }
@Override public Object unmarshal(DataInput dis) throws IOException { DataInput dataIn = dis; if (!sizePrefixDisabled) { int size = dis.readInt(); if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } // int size = dis.readInt(); // byte[] data = new byte[size]; // dis.readFully(data); // bytesIn.restart(data); // dataIn = bytesIn; } return doUnmarshal(dataIn); }
@Override public Object unmarshal(DataInput dis) throws IOException { DataInput dataIn = dis; if (!sizePrefixDisabled) { int size = dis.readInt(); if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } // int size = dis.readInt(); // byte[] data = new byte[size]; // dis.readFully(data); // bytesIn.restart(data); // dataIn = bytesIn; } return doUnmarshal(dataIn); }
@Override public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }
@Override public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }
@Override public synchronized Object unmarshal(ByteSequence sequence) throws IOException { bytesIn.restart(sequence); // DataInputStream dis = new DataInputStream(new // ByteArrayInputStream(sequence)); if (!sizePrefixDisabled) { int size = bytesIn.readInt(); if (sequence.getLength() - 4 != size) { // throw new IOException("Packet size does not match marshaled // size"); } if (size > maxFrameSize) { throw IOExceptionSupport.createFrameSizeException(size, maxFrameSize); } } Object command = doUnmarshal(bytesIn); // if( !cacheEnabled && ((DataStructure)command).isMarshallAware() ) { // ((MarshallAware) command).setCachedMarshalledForm(this, sequence); // } return command; }