ly.img.android.pesdk.backend.exif / IOUtils / toString

toString

static fun toString(input: java.io.InputStream): java.lang.String

Get the contents of an InputStream as a String using the default character encoding of the platform.

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

Parameters

input - java.io.InputStream: the InputStream to read from

Exceptions

NullPointerException - if the input is null

IOException - if an I/O error occurs

Return
java.lang.String: the requested String

static fun toString(input: java.io.InputStream, encoding: java.lang.String): java.lang.String

Get the contents of an InputStream as a String using the specified character encoding.

Character encoding names can be found at IANA.

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

Parameters

input - java.io.InputStream: the InputStream to read from

encoding - java.lang.String: the encoding to use, null means platform default

Exceptions

NullPointerException - if the input is null

IOException - if an I/O error occurs

Return
java.lang.String: the requested String

static fun toString(input: java.io.Reader): java.lang.String

Get the contents of a Reader as a String.

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

Parameters

input - java.io.Reader: the Reader to read from

Exceptions

NullPointerException - if the input is null

IOException - if an I/O error occurs

Return
java.lang.String: the requested String

static fun toString(input: kotlin.Array<byte>): java.lang.String
Deprecated: Use String#String(byte[])

Get the contents of a byte[] as a String using the default character encoding of the platform.

Parameters

input - kotlin.Array<byte>: the byte array to read from

Exceptions

NullPointerException - if the input is null

IOException - if an I/O error occurs (never occurs)

Return
java.lang.String: the requested String

static fun toString(input: kotlin.Array<byte>, encoding: java.lang.String): java.lang.String
Deprecated: Use String#String(byte[],String)

Get the contents of a byte[] as a String using the specified character encoding.

Character encoding names can be found at IANA.

Parameters

input - kotlin.Array<byte>: the byte array to read from

encoding - java.lang.String: the encoding to use, null means platform default

Exceptions

NullPointerException - if the input is null

IOException - if an I/O error occurs (never occurs)

Return
java.lang.String: the requested String