private void readFrame() throws TTransportException { underlying.readAll(i32buf , 0, 4); int size = TFramedTransport.decodeFrameSize(i32buf); if (size < 0) { throw new TTransportException("Read a negative frame size (" + size + ")!"); } if (size > maxLength) { throw new TTransportException("Frame size (" + size + ") larger than max length (" + maxLength + ")!"); } readBuffer.fill(underlying, size); }
public int getCurChunk() throws TTransportException { if(!isOpen()) throw new TTransportException(TTransportException.NOT_OPEN, "Must open before getCurChunk"); return (cs.getChunkNum()); }
private void readFrame() throws TTransportException { transport_.readAll(i32buf, 0, 4); int size = decodeFrameSize(i32buf); if (size < 0) { throw new TTransportException("Read a negative frame size (" + size + ")!"); } if (size > maxLength_) { throw new TTransportException("Frame size (" + size + ") larger than max length (" + maxLength_ + ")!"); } byte[] buff = new byte[size]; transport_.readAll(buff, 0, size); readBuffer_.reset(buff); }
public void seekToEnd() throws TTransportException { if(!isOpen()) throw new TTransportException(TTransportException.NOT_OPEN, "Must open before seeking"); seekToChunk(getNumChunks()); }
public final TTransport accept() throws TTransportException { TTransport transport = acceptImpl(); if (transport == null) { throw new TTransportException("accept() may not return NULL"); } return transport; }
public void fill(TTransport inTrans, int length) throws TTransportException { buf.resizeIfNecessary(length); inTrans.readAll(buf.array(), 0, length); pos = 0; limit = length; }
/** * Process a current chunk */ public void processChunk() throws TException { processChunk(inputTransport_.getCurChunk()); } }
/** * True if the underlying transport is open and the SASL handshake is * complete. */ @Override public boolean isOpen() { return underlyingTransport.isOpen() && sasl != null && sasl.isComplete(); }
private void readFrame() throws TTransportException { underlying.readAll(i32buf , 0, 4); int size = TFramedTransport.decodeFrameSize(i32buf); if (size < 0) { throw new TTransportException("Read a negative frame size (" + size + ")!"); } if (size > maxLength) { throw new TTransportException("Frame size (" + size + ") larger than max length (" + maxLength + ")!"); } readBuffer.fill(underlying, size); }
private void readFrame() throws TTransportException { transport_.readAll(i32buf, 0, 4); int size = decodeFrameSize(i32buf); if (size < 0) { throw new TTransportException("Read a negative frame size (" + size + ")!"); } if (size > maxLength_) { throw new TTransportException("Frame size (" + size + ") larger than max length (" + maxLength_ + ")!"); } byte[] buff = new byte[size]; transport_.readAll(buff, 0, size); readBuffer_.reset(buff); }
public void seekToEnd() throws TTransportException { if(!isOpen()) throw new TTransportException(TTransportException.NOT_OPEN, "Must open before seeking"); seekToChunk(getNumChunks()); }
public int getCurChunk() throws TTransportException { if(!isOpen()) throw new TTransportException(TTransportException.NOT_OPEN, "Must open before getCurChunk"); return (cs.getChunkNum()); }
public final TTransport accept() throws TTransportException { TTransport transport = acceptImpl(); if (transport == null) { throw new TTransportException("accept() may not return NULL"); } return transport; }
/** * Process a current chunk */ public void processChunk() throws TException { processChunk(inputTransport_.getCurChunk()); } }
/** * True if the underlying transport is open and the SASL handshake is * complete. */ @Override public boolean isOpen() { return underlyingTransport.isOpen() && sasl != null && sasl.isComplete(); }