protected void ensureOpen() throws IOException { final Socket socket = this.socketHolder.get(); Asserts.check(socket != null, "Connection is not open"); if (!this.inbuffer.isBound()) { this.inbuffer.bind(getSocketInputStream(socket)); } if (!this.outbuffer.isBound()) { this.outbuffer.bind(getSocketOutputStream(socket)); } }
protected void ensureOpen() throws IOException { final Socket socket = this.socketHolder.get(); if (socket == null) { throw new ConnectionClosedException("Connection is closed"); } if (!this.inbuffer.isBound()) { this.inbuffer.bind(getSocketInputStream(socket)); } if (!this.outbuffer.isBound()) { this.outbuffer.bind(getSocketOutputStream(socket)); } }
protected void ensureOpen() throws IOException { final Socket socket = this.socketHolder.get(); if (socket == null) { throw new ConnectionClosedException("Connection is closed"); } if (!this.inbuffer.isBound()) { this.inbuffer.bind(getSocketInputStream(socket)); } if (!this.outbuffer.isBound()) { this.outbuffer.bind(getSocketOutputStream(socket)); } }
protected void ensureOpen() throws IOException { final Socket socket = this.socketHolder.get(); if (socket == null) { throw new ConnectionClosedException("Connection is closed"); } if (!this.inbuffer.isBound()) { this.inbuffer.bind(getSocketInputStream(socket)); } if (!this.outbuffer.isBound()) { this.outbuffer.bind(getSocketOutputStream(socket)); } }
protected void ensureOpen() throws IOException { final Socket socket = this.socketHolder.get(); if (socket == null) { throw new ConnectionClosedException("Connection is closed"); } if (!this.inbuffer.isBound()) { this.inbuffer.bind(getSocketInputStream(socket)); } if (!this.outbuffer.isBound()) { this.outbuffer.bind(getSocketOutputStream(socket)); } }
protected void ensureOpen() throws IOException { Asserts.check(this.open, "Connection is not open"); if (!this.inbuffer.isBound()) { this.inbuffer.bind(getSocketInputStream(this.socket)); } if (!this.outbuffer.isBound()) { this.outbuffer.bind(getSocketOutputStream(this.socket)); } }