/** * Diverging from the cpp model and sticking to the TSocket model * Files are not opened in ctor - but in explicit open call */ public void open() throws TTransportException { if (isOpen()) throw new TTransportException(TTransportException.ALREADY_OPEN); try { inputStream_ = createInputStream(); cs = new chunkState(); currentEvent_ = new Event(new byte [256]); if(!readOnly_) outputStream_ = new BufferedOutputStream(inputFile_.getOutputStream(), 8192); } catch (IOException iox) { throw new TTransportException(TTransportException.NOT_OPEN, iox); } }
/** * Diverging from the cpp model and sticking to the TSocket model * Files are not opened in ctor - but in explicit open call */ public void open() throws TTransportException { if (isOpen()) throw new TTransportException(TTransportException.ALREADY_OPEN); try { inputStream_ = createInputStream(); cs = new chunkState(); currentEvent_ = new Event(new byte [256]); if(!readOnly_) outputStream_ = new BufferedOutputStream(inputFile_.getOutputStream(), 8192); } catch (IOException iox) { throw new TTransportException(TTransportException.NOT_OPEN, iox); } }
currentEvent_ = new Event(new byte [esize]);
currentEvent_ = new Event(new byte [esize]);