public void write(int b) throws IOException { try { client.write(finalHandle, offset, new byte[] { (byte) b }, 0, 1); } catch (IOException ioe) { throw ioe; } catch (Exception e) { IOException ioException = new IOException(); ioException.initCause(e); throw ioException; } }
public void write(byte[] b, int off, int len) throws IOException { try { client.write(finalHandle, offset, b, off, len); } catch (IOException ioe) { throw ioe; } catch (Exception e) { IOException ioException = new IOException(); ioException.initCause(e); throw ioException; } }
@Override public void write(int b) throws IOException { byte[] buffer = new byte[1]; buffer[0] = (byte) b; handle.getClient().write(handle, writeOffset, buffer, 0, 1); writeOffset += 1; }
@Override public void write(int b) throws IOException { byte[] buffer = new byte[1]; buffer[0] = (byte) b; handle.getClient().write(handle, writeOffset, buffer, 0, 1); writeOffset += 1; }
@Override public void write(int b) throws IOException { byte[] buffer = new byte[1]; buffer[0] = (byte) b; handle.getClient().write(handle, writeOffset, buffer, 0, 1); writeOffset += 1; }
public void write(byte[] d, int s, int len) throws java.io.IOException { if (isClosed) { throw new IOException("stream already closed"); } if (d == null) { throw new NullPointerException(); } if (s < 0 || len < 0 || s + len > d.length) { throw new IndexOutOfBoundsException(); } try { client.write(handle, startid, d, s, len); startid += len; } catch (IOException e) { throw e; } catch (Exception e) { throw new IOException(e.toString()); } }
/** * Writes <code>len</code> bytes from the specified byte array * starting at offset <code>off</code> to this output stream. * The general contract for <code>write(b, off, len)</code> is that * some of the bytes in the array <code>b</code> are written to the * output stream in order; element <code>b[off]</code> is the first * byte written and <code>b[off+len-1]</code> is the last byte written * by this operation. * * @see SFTPv3Client#write(SFTPv3FileHandle,long,byte[],int,int) */ @Override public void write(byte[] buffer, int offset, int len) throws IOException { // We can just blindly write the whole buffer at once. // if <code>len</code> > 32768, then the write operation will // be split into multiple writes in SFTPv3Client#write. handle.getClient().write(handle, writeOffset, buffer, offset, len); writeOffset += len; }
/** * Writes <code>len</code> bytes from the specified byte array * starting at offset <code>off</code> to this output stream. * The general contract for <code>write(b, off, len)</code> is that * some of the bytes in the array <code>b</code> are written to the * output stream in order; element <code>b[off]</code> is the first * byte written and <code>b[off+len-1]</code> is the last byte written * by this operation. * * @see SFTPv3Client#write(SFTPv3FileHandle,long,byte[],int,int) */ @Override public void write(byte[] buffer, int offset, int len) throws IOException { // We can just blindly write the whole buffer at once. // if <code>len</code> > 32768, then the write operation will // be split into multiple writes in SFTPv3Client#write. handle.getClient().write(handle, writeOffset, buffer, offset, len); writeOffset += len; }
/** * Writes <code>len</code> bytes from the specified byte array * starting at offset <code>off</code> to this output stream. * The general contract for <code>write(b, off, len)</code> is that * some of the bytes in the array <code>b</code> are written to the * output stream in order; element <code>b[off]</code> is the first * byte written and <code>b[off+len-1]</code> is the last byte written * by this operation. * * @see SFTPv3Client#write(SFTPv3FileHandle,long,byte[],int,int) */ @Override public void write(byte[] buffer, int offset, int len) throws IOException { // We can just blindly write the whole buffer at once. // if <code>len</code> > 32768, then the write operation will // be split into multiple writes in SFTPv3Client#write. handle.getClient().write(handle, writeOffset, buffer, offset, len); writeOffset += len; }
client.write(handle, fileOffset, buf, 0, r); } catch (IOException e) { throw e;