/** * Closes the socket. */ public void close() { // Close the underlying streams super.close(); // Close the socket if (socket_ != null) { try { socket_.close(); } catch (IOException iox) { LOGGER.warn("Could not close socket.", iox); } socket_ = null; } }
@Override public void close() { super.close(); if (transport_.isOpen()) { transport_.close(); } } }
public void close() throws IOException { if (transport != null) { transport.close(); } } }
public void close() throws IOException { if (transport != null) { transport.close(); } } }
public void close() throws IOException { if (transport != null) { transport.close(); } } }
public void close() throws IOException { if (transport != null) { transport.close(); } } }
/** * Closes the socket. */ public void close() { // Close the underlying streams super.close(); // Close the socket if (socket_ != null) { try { socket_.close(); } catch (IOException iox) { LOGGER.warn("Could not close socket.", iox); } socket_ = null; } }
/** * Closes the socket. */ public void close() { // Close the underlying streams super.close(); // Close the socket if (socket != null) { try { socket.close(); } catch (IOException iox) { LOGGER.warn("Could not close socket.", iox); } socket = null; } }
/** * Closes the socket. */ public void close() { // Close the underlying streams super.close(); // Close the socket if (socket_ != null) { try { socket_.close(); } catch (IOException iox) { LOGGER.warn("Could not close socket.", iox); } socket_ = null; } }
/** * Closes the socket. */ public void close() { // Close the underlying streams super.close(); // Close the socket if (socket_ != null) { try { socket_.close(); } catch (IOException iox) { LOGGER.warn("Could not close socket.", iox); } socket_ = null; } }
/** * Closes the socket. */ public void close() { // Close the underlying streams super.close(); // Close the socket if (socket != null) { try { socket.close(); } catch (IOException iox) { LOGGER.warn("Could not close socket.", iox); } socket = null; } }
/** * Closes the socket. */ public void close() { // Close the underlying streams super.close(); // Close the socket if (socket != null) { try { socket.close(); } catch (IOException iox) { LOGGER.warn("Could not close socket.", iox); } socket = null; } }
public static <A extends TBase> InputStream toStream(A base){ try { ByteArrayOutputStream out = new ByteArrayOutputStream(); TIOStreamTransport sport = new TIOStreamTransport(out); TProtocol protocol = createTProtocol(sport); base.write(protocol); sport.close(); return new ByteArrayInputStream(out.toByteArray()); } catch (Exception e) { throw new RuntimeException(e); } }
public static <A extends TBase> byte[] toBytes(A base){ ByteArrayOutputStream out = null; try { out = getPool().borrowObject(); TIOStreamTransport sport = new TIOStreamTransport(out); TProtocol protocol = createTProtocol(sport); base.write(protocol); sport.close(); return out.toByteArray(); } catch (Exception e) { throw new RuntimeException(e); }finally { if(out != null){ getPool().returnObject(out); } } }