@Override protected void sendUrgentData(int data) throws IOException { NativeUnixSocket.write(fd, new byte[] {(byte) (data & 0xFF)}, 0, 1); }
@Override public void write(byte[] buf, int off, int len) throws IOException { if (streamClosed) { throw new AFUNIXSocketException("This OutputStream has already been closed."); } if (len > buf.length - off) { throw new IndexOutOfBoundsException(); } try { while (len > 0 && !Thread.interrupted()) { final int written = NativeUnixSocket.write(fd, buf, off, len); if (written == -1) { throw new IOException("Unspecific error while writing"); } len -= written; off += written; } } catch (final IOException e) { throw (IOException) new IOException(e.getMessage() + " at " + AFUNIXSocketImpl.this.toString()).initCause(e); } }
@Override protected void sendUrgentData(int data) throws IOException { NativeUnixSocket.write(fd, new byte[] {(byte) (data & 0xFF)}, 0, 1); }
@Override protected void sendUrgentData(int data) throws IOException { NativeUnixSocket.write(fd, new byte[] {(byte) (data & 0xFF)}, 0, 1); }
@Override protected void sendUrgentData(int data) throws IOException { FileDescriptor fdesc = validFdOrException(); NativeUnixSocket.write(fdesc, new byte[] {(byte) (data & 0xFF)}, 0, 1); }
@Override public void write(byte[] buf, int off, int len) throws IOException { if (streamClosed) { throw new AFUNIXSocketException("This OutputStream has already been closed."); } if (len > buf.length - off) { throw new IndexOutOfBoundsException(); } try { while (len > 0 && !Thread.interrupted()) { final int written = NativeUnixSocket.write(fd, buf, off, len); if (written == -1) { throw new IOException("Unspecific error while writing"); } len -= written; off += written; } } catch (final IOException e) { throw (IOException) new IOException(e.getMessage() + " at " + AFUNIXSocketImpl.this.toString()).initCause(e); } }
throw ex; final int written = NativeUnixSocket.write(fdesc, buf, off, len); if (written < 0) { throw new IOException("Unspecific error while writing");
@Override public void write(byte[] buf, int off, int len) throws IOException { if (streamClosed) { throw new AFUNIXSocketException("This OutputStream has already been closed."); } if (len > buf.length - off) { throw new IndexOutOfBoundsException(); } try { while (len > 0 && !Thread.interrupted()) { final int written = NativeUnixSocket.write(fd, buf, off, len); if (written == -1) { throw new IOException("Unspecific error while writing"); } len -= written; off += written; } } catch (final IOException e) { throw (IOException) new IOException(e.getMessage() + " at " + AFUNIXSocketImpl.this.toString()).initCause(e); } }