Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.utils.io
Class DataTransferHelper

    java.lang.Object
      oracle.ifs.utils.io.DataTransferHelper

    public class DataTransferHelper

extends java.lang.Object

The `DataTransferHelper.java` class Class for transfering from input stream to output stream.

Field Summary
`protected java.io.InputStream` | `m_in`
`protected boolean` | `m_isBinaryTransfer`
`protected java.io.OutputStream` | `m_out`

Constructor Summary
`DataTransferHelper()`
`DataTransferHelper(java.io.InputStream in, java.io.OutputStream out, boolean isBinaryTransfer)` Creates a DataTransferHelper

Method Summary
`protected byte[]` | `getByteBuffer()` gets a bytes buffer
`protected int` | `getDesiredBufferSize()` determines the size of the byte buffer
`void` | `reset(java.io.InputStream in, java.io.OutputStream out, boolean isBinaryTransfer)`
`int` | `transfer()` Transfers the content from InputStream to OutputStream
`protected int` | `transferAsciiData(java.io.InputStream in, java.io.OutputStream out)` Transfer content from an inputstream to an outputstream, processing newlines.
`protected int` | `transferBinaryData(java.io.InputStream in, java.io.OutputStream out)` Transfer content from an inputstream to an outputstream, with no newline processing
`protected int` | `transferData(java.io.InputStream in, java.io.OutputStream out, boolean isBinaryTransfer)` Transfers content from inputstream to outputstream

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_in

    protected java.io.InputStream m_in

### m_out

    protected java.io.OutputStream m_out

### m_isBinaryTransfer

    protected boolean m_isBinaryTransfer

Constructor Detail

### DataTransferHelper

    public DataTransferHelper()

### DataTransferHelper

    public DataTransferHelper(java.io.InputStream in,
                              java.io.OutputStream out,
                              boolean isBinaryTransfer)

  Creates a DataTransferHelper

  Parameters:
    `isBinaryTransfer` - boolean to transfer in binary or ascii

Method Detail

### reset

    public void reset(java.io.InputStream in,
                      java.io.OutputStream out,
                      boolean isBinaryTransfer)

### transfer

    public int transfer()
                 throws java.io.IOException

  Description copied from class: `DataTransferHelper`
  Transfers the content from InputStream to OutputStream

  Throws:
    `java.io.IOException`

### transferData

    protected int transferData(java.io.InputStream in,
                               java.io.OutputStream out,
                               boolean isBinaryTransfer)
                        throws java.io.IOException

  Description copied from class: `DataTransferHelper`
  Transfers content from inputstream to outputstream

  Parameters:
    `in` - the input stream
    `out` - the output stream
    `isBinaryTransfer` - if true binary transfer, if false ascii transfer with bytes put on wire according to ftp rfc (no
  Returns:
    int the number of bytes transfered
  Throws:
    `java.io.IOException`

### transferBinaryData

    protected final int transferBinaryData(java.io.InputStream in,
                                           java.io.OutputStream out)
                                    throws java.io.IOException

  Description copied from class: `DataTransferHelper`
  Transfer content from an inputstream to an outputstream, with no newline processing

  Returns:
    int the number of bytes transfered
  Throws:
    `java.io.IOException`

### transferAsciiData

    protected final int transferAsciiData(java.io.InputStream in,
                                          java.io.OutputStream out)
                                   throws java.io.IOException

  Description copied from class: `DataTransferHelper`
  Transfer content from an inputstream to an outputstream, processing newlines. Warning this method does not work for 2 byte characters.

  Returns:
    int the number of bytes transfered
  Throws:
    `java.io.IOException`

### getDesiredBufferSize

    protected int getDesiredBufferSize()

  Description copied from class: `DataTransferHelper`
  determines the size of the byte buffer

### getByteBuffer

    protected byte[] getByteBuffer()

  Description copied from class: `DataTransferHelper`
  gets a bytes buffer

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD