object IOUtils
- Alphabetic
- By Inheritance
- IOUtils
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val DEFAULT_BUFFER_SIZE: Int
- val EOF: Int
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
copy(input: InputStream, output: OutputStream, bufferSize: Int): Long
Copies bytes from an
InputStreamto anOutputStreamusing an internal buffer of the given size.Copies bytes from an
InputStreamto anOutputStreamusing an internal buffer of the given size.This method buffers the input internally, so there is no need to use a
BufferedInputStream.- input
the
InputStreamto read from- output
the
OutputStreamto 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
IOExceptionif an I/O error occursNullPointerExceptionif the input or output is null
-
def
copy(input: InputStream, output: OutputStream): Int
Copies bytes from an
InputStreamto anOutputStream.Copies bytes from an
InputStreamto anOutputStream.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
-1after the copy has completed since the correct number of bytes cannot be returned as an int. For large streams use thecopyLarge(InputStream, OutputStream)method.- input
the
InputStreamto read from- output
the
OutputStreamto write to- returns
the number of bytes copied, or -1 if > Integer.MAX_VALUE
- Annotations
- @throws( ... )
- Since
1.1
- Exceptions thrown
IOExceptionif an I/O error occursNullPointerExceptionif the input or output is null
-
def
copyLarge(input: InputStream, output: OutputStream, buffer: Array[Byte]): Long
Copies bytes from a large (over 2GB)
InputStreamto anOutputStream.Copies bytes from a large (over 2GB)
InputStreamto anOutputStream.This method uses the provided buffer, so there is no need to use a
BufferedInputStream.- input
the
InputStreamto read from- output
the
OutputStreamto write to- buffer
the buffer to use for the copy
- returns
the number of bytes copied
- Annotations
- @throws( ... )
- Since
2.2
- Exceptions thrown
IOExceptionif an I/O error occursNullPointerExceptionif the input or output is null
-
def
copyLarge(input: InputStream, output: OutputStream): Long
Copies bytes from a large (over 2GB)
InputStreamto anOutputStream.Copies bytes from a large (over 2GB)
InputStreamto anOutputStream.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
InputStreamto read from- output
the
OutputStreamto write to- returns
the number of bytes copied
- Annotations
- @throws( ... )
- Since
1.3
- Exceptions thrown
IOExceptionif an I/O error occursNullPointerExceptionif the input or output is null
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toByteArray(input: InputStream, size: Int): Array[Byte]
Gets the contents of an
InputStreamas abyte[].Gets the contents of an
InputStreamas abyte[]. Use this method instead oftoByteArray(InputStream)whenInputStreamsize is known- input
the
InputStreamto read from- size
the size of
InputStream- returns
the requested byte array
- Annotations
- @throws( ... )
- Since
2.1
- Exceptions thrown
IOExceptionif an I/O error occurs orInputStreamsize differ from parameter sizeIllegalArgumentExceptionif size is less than zero
-
def
toByteArray(input: InputStream, size: Long): Array[Byte]
Gets contents of an
InputStreamas abyte[].Gets contents of an
InputStreamas abyte[]. Use this method instead oftoByteArray(InputStream)whenInputStreamsize 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
InputStreamto read from- size
the size of
InputStream- returns
the requested byte array
- Annotations
- @throws( ... )
- Since
2.1
- Exceptions thrown
IOExceptionif an I/O error occurs orInputStreamsize differ from parameter sizeIllegalArgumentExceptionif size is less than zero or size is greater than Integer.MAX_VALUE- See also
IOUtils#toByteArray(java.io.InputStream, int)
-
def
toByteArray(input: InputStream): Array[Byte]
Gets the contents of an
InputStreamas abyte[].Gets the contents of an
InputStreamas abyte[].This method buffers the input internally, so there is no need to use a
BufferedInputStream.- input
the
InputStreamto read from- returns
the requested byte array
- Annotations
- @throws( ... )
- Exceptions thrown
IOExceptionif an I/O error occursNullPointerExceptionif the input is null
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )