Packages

object IOUtils

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IOUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val DEFAULT_BUFFER_SIZE: Int
  5. val EOF: Int
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def copy(input: InputStream, output: OutputStream, bufferSize: Int): Long

    Copies bytes from an InputStream to an OutputStream using an internal buffer of the given size.

    Copies bytes from an InputStream to an OutputStream using an internal buffer of the given size.

    This method buffers the input internally, so there is no need to use a BufferedInputStream.

    input

    the InputStream to read from

    output

    the OutputStream to write to

    bufferSize

    the bufferSize used to copy from the input to the output

    returns

    the number of bytes copied

    Annotations
    @throws( ... )
    Since

    2.5

    Exceptions thrown

    IOException if an I/O error occurs

    NullPointerException if the input or output is null

  9. def copy(input: InputStream, output: OutputStream): Int

    Copies bytes from an InputStream to an OutputStream.

    Copies bytes from an InputStream to an OutputStream.

    This method buffers the input internally, so there is no need to use a BufferedInputStream.

    Large streams (over 2GB) will return a bytes copied value of -1 after the copy has completed since the correct number of bytes cannot be returned as an int. For large streams use the copyLarge(InputStream, OutputStream) method.

    input

    the InputStream to read from

    output

    the OutputStream to write to

    returns

    the number of bytes copied, or -1 if > Integer.MAX_VALUE

    Annotations
    @throws( ... )
    Since

    1.1

    Exceptions thrown

    IOException if an I/O error occurs

    NullPointerException if the input or output is null

  10. def copyLarge(input: InputStream, output: OutputStream, buffer: Array[Byte]): Long

    Copies bytes from a large (over 2GB) InputStream to an OutputStream.

    Copies bytes from a large (over 2GB) InputStream to an OutputStream.

    This method uses the provided buffer, so there is no need to use a BufferedInputStream.

    input

    the InputStream to read from

    output

    the OutputStream to write to

    buffer

    the buffer to use for the copy

    returns

    the number of bytes copied

    Annotations
    @throws( ... )
    Since

    2.2

    Exceptions thrown

    IOException if an I/O error occurs

    NullPointerException if the input or output is null

  11. def copyLarge(input: InputStream, output: OutputStream): Long

    Copies bytes from a large (over 2GB) InputStream to an OutputStream.

    Copies bytes from a large (over 2GB) InputStream to an OutputStream.

    This method buffers the input internally, so there is no need to use a BufferedInputStream.

    The buffer size is given by #DEFAULT_BUFFER_SIZE.

    input

    the InputStream to read from

    output

    the OutputStream to write to

    returns

    the number of bytes copied

    Annotations
    @throws( ... )
    Since

    1.3

    Exceptions thrown

    IOException if an I/O error occurs

    NullPointerException if the input or output is null

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toByteArray(input: InputStream, size: Int): Array[Byte]

    Gets the contents of an InputStream as a byte[].

    Gets the contents of an InputStream as a byte[]. Use this method instead of toByteArray(InputStream) when InputStream size is known

    input

    the InputStream to read from

    size

    the size of InputStream

    returns

    the requested byte array

    Annotations
    @throws( ... )
    Since

    2.1

    Exceptions thrown

    IOException if an I/O error occurs or InputStream size differ from parameter size

    IllegalArgumentException if size is less than zero

  23. def toByteArray(input: InputStream, size: Long): Array[Byte]

    Gets contents of an InputStream as a byte[].

    Gets contents of an InputStream as a byte[]. Use this method instead of toByteArray(InputStream) when InputStream size is known. NOTE: the method checks that the length can safely be cast to an int without truncation before using IOUtils.toByteArray to read into the byte array. (Arrays can have no more than Integer.MAX_VALUE entries anyway)

    input

    the InputStream to read from

    size

    the size of InputStream

    returns

    the requested byte array

    Annotations
    @throws( ... )
    Since

    2.1

    Exceptions thrown

    IOException if an I/O error occurs or InputStream size differ from parameter size

    IllegalArgumentException if size is less than zero or size is greater than Integer.MAX_VALUE

    See also

    IOUtils#toByteArray(java.io.InputStream, int)

  24. def toByteArray(input: InputStream): Array[Byte]

    Gets the contents of an InputStream as a byte[].

    Gets the contents of an InputStream as a byte[].

    This method buffers the input internally, so there is no need to use a BufferedInputStream.

    input

    the InputStream to read from

    returns

    the requested byte array

    Annotations
    @throws( ... )
    Exceptions thrown

    IOException if an I/O error occurs

    NullPointerException if the input is null

  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped