/** * Constructor that takes an already created socket. * * @param socket Already created socket object * @throws TTransportException if there is an error setting up the streams */ public SnappyTSSLSocket(Socket socket, SocketParameters params) throws TTransportException { super(socket); this.socketToSameHost = ClientSharedUtils.isSocketToSameHost( socket.getLocalSocketAddress(), socket.getRemoteSocketAddress()); if (isOpen()) { try { setProperties(socket, params.getReadTimeout(), params); this.inputStream_ = new BufferedInputStream(socket.getInputStream(), this.inputBufferSize); this.outputStream_ = new BufferedOutputStream(socket.getOutputStream(), this.outputBufferSize); } catch (IOException ioe) { close(); throw new TTransportException(TTransportException.NOT_OPEN, ioe); } } }
this.outputBufferSize); } catch (IOException ioe) { close(); throw new TTransportException(TTransportException.NOT_OPEN, ioe);