Class FTPClient.ByteArrayDataSink

java.lang.Object
org.globus.ftp.FTPClient.ByteArrayDataSink
All Implemented Interfaces:
DataSink
Enclosing class:
FTPClient

private class FTPClient.ByteArrayDataSink extends Object implements DataSink
  • Field Details

  • Constructor Details

    • ByteArrayDataSink

      public ByteArrayDataSink()
  • Method Details

    • write

      public void write(Buffer buffer) throws IOException
      Description copied from interface: DataSink
      Writes the specified buffer to this data sink.
      Note: buffer.getOffset() might return -1 if the transfer mode used does not support data offsets, for example stream transfer mode.
      Specified by:
      write in interface DataSink
      Parameters:
      buffer - the data buffer to write.
      Throws:
      IOException - if an I/O error occurs.
    • close

      public void close() throws IOException
      Description copied from interface: DataSink
      Closes this data sink and releases any system resources associated with this sink.
      Specified by:
      close in interface DataSink
      Throws:
      IOException - if an I/O error occurs.
    • getData

      public ByteArrayOutputStream getData()