List of usage examples for com.rabbitmq.client.impl Frame getInputStream
public DataInputStream getInputStream()
From source file:de.htwk_leipzig.bis.connection.handshake.clientRewrite.CommandAssembler.java
License:Mozilla Public License
private void consumeMethodFrame(Frame f) throws IOException { if (f.type == AMQP.FRAME_METHOD) { this.method = AMQImpl.readMethodFrom(f.getInputStream()); this.state = this.method.hasContent() ? CAState.EXPECTING_CONTENT_HEADER : CAState.COMPLETE; } else {//from w w w .ja v a2 s. c om throw new UnexpectedFrameError(f, AMQP.FRAME_METHOD); } }
From source file:de.htwk_leipzig.bis.connection.handshake.clientRewrite.CommandAssembler.java
License:Mozilla Public License
private void consumeHeaderFrame(Frame f) throws IOException { if (f.type == AMQP.FRAME_HEADER) { this.contentHeader = AMQImpl.readContentHeaderFrom(f.getInputStream()); this.remainingBodyBytes = this.contentHeader.getBodySize(); updateContentBodyState();//w ww . j a v a2s. c o m } else { throw new UnexpectedFrameError(f, AMQP.FRAME_HEADER); } }