@Override public void flush() throws IOException { if (closed) { throw new IllegalStateException( sm.getString("wsRemoteEndpoint.closedOutputStream")); } // Optimisation. If there is no data to flush then do not send an // empty message. if (!Constants.STREAMS_DROP_EMPTY_MESSAGES || buffer.position() > 0) { doWrite(false); } }
@Override public void flush() throws IOException { if (closed) { throw new IllegalStateException( sm.getString("wsRemoteEndpoint.closedOutputStream")); } // Optimisation. If there is no data to flush then do not send an // empty message. if (!Constants.STREAMS_DROP_EMPTY_MESSAGES || buffer.position() > 0) { doWrite(false); } }
@Override public void flush() throws IOException { if (closed) { throw new IllegalStateException( sm.getString("wsRemoteEndpoint.closedOutputStream")); } // Optimisation. If there is no data to flush then do not send an // empty message. if (!Constants.STREAMS_DROP_EMPTY_MESSAGES || buffer.position() > 0) { doWrite(false); } }
@Override public void close() throws IOException { synchronized (closeLock) { if (closed) { return; } closed = true; } doWrite(true); }
@Override public void close() throws IOException { synchronized (closeLock) { if (closed) { return; } closed = true; } doWrite(true); }
@Override public void close() throws IOException { synchronized (closeLock) { if (closed) { return; } closed = true; } doWrite(true); }
@Override public void close() throws IOException { synchronized (closeLock) { if (closed) { return; } closed = true; } doWrite(true); }
@Override public void close() throws IOException { synchronized (closeLock) { if (closed) { return; } closed = true; } doWrite(true); }
@Override public void flush() throws IOException { if (closed) { throw MESSAGES.closedOutputStream(); } doWrite(false); }
@Override public void flush() throws IOException { if (closed) { throw new IllegalStateException( sm.getString("wsRemoteEndpoint.closedOutputStream")); } doWrite(false); }