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

write

open static fun write(data: ByteArray!, output: OutputStream!): Unit

Writes bytes from a byte[] to an OutputStream.

Parameters

data - ByteArray!: the byte array to write, do not modify during output, null ignored

output - OutputStream!: the OutputStream to write to

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: ByteArray!, output: Writer!): Unit

Writes bytes from a byte[] to chars on a Writer using the default character encoding of the platform.

This method uses String#String(byte[]).

Parameters

data - ByteArray!: the byte array to write, do not modify during output, null ignored

output - Writer!: the Writer to write to

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: ByteArray!, output: Writer!, encoding: String!): Unit

Writes bytes from a byte[] to chars on a Writer using the specified character encoding.

Character encoding names can be found at IANA.

This method uses String#String(byte[], String).

Parameters

data - ByteArray!: the byte array to write, do not modify during output, null ignored

output - Writer!: the Writer to write to

encoding - String!: the encoding to use, null means platform default

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: CharArray!, output: Writer!): Unit

Writes chars from a char[] to a Writer using the default character encoding of the platform.

Parameters

data - CharArray!: the char array to write, do not modify during output, null ignored

output - Writer!: the Writer to write to

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: CharArray!, output: OutputStream!): Unit

Writes chars from a char[] to bytes on an OutputStream.

This method uses String#String(char[]) and String#getBytes().

Parameters

data - CharArray!: the char array to write, do not modify during output, null ignored

output - OutputStream!: the OutputStream to write to

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: CharArray!, output: OutputStream!, encoding: String!): Unit

Writes chars from a char[] to bytes on an OutputStream using the specified character encoding.

Character encoding names can be found at IANA.

This method uses String#String(char[]) and String#getBytes(String).

Parameters

data - CharArray!: the char array to write, do not modify during output, null ignored

output - OutputStream!: the OutputStream to write to

encoding - String!: the encoding to use, null means platform default

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: String!, output: Writer!): Unit

Writes chars from a String to a Writer.

Parameters

data - String!: the String to write, null ignored

output - Writer!: the Writer to write to

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: String!, output: OutputStream!): Unit

Writes chars from a String to bytes on an OutputStream using the default character encoding of the platform.

This method uses String#getBytes().

Parameters

data - String!: the String to write, null ignored

output - OutputStream!: the OutputStream to write to

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: String!, output: OutputStream!, encoding: String!): Unit

Writes chars from a String to bytes on an OutputStream using the specified character encoding.

Character encoding names can be found at IANA.

This method uses String#getBytes(String).

Parameters

data - String!: the String to write, null ignored

output - OutputStream!: the OutputStream to write to

encoding - String!: the encoding to use, null means platform default

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: StringBuffer!, output: Writer!): Unit

Writes chars from a StringBuffer to a Writer.

Parameters

data - StringBuffer!: the StringBuffer to write, null ignored

output - Writer!: the Writer to write to

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: StringBuffer!, output: OutputStream!): Unit

Writes chars from a StringBuffer to bytes on an OutputStream using the default character encoding of the platform.

This method uses String#getBytes().

Parameters

data - StringBuffer!: the StringBuffer to write, null ignored

output - OutputStream!: the OutputStream to write to

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1

open static fun write(data: StringBuffer!, output: OutputStream!, encoding: String!): Unit

Writes chars from a StringBuffer to bytes on an OutputStream using the specified character encoding.

Character encoding names can be found at IANA.

This method uses String#getBytes(String).

Parameters

data - StringBuffer!: the StringBuffer to write, null ignored

output - OutputStream!: the OutputStream to write to

encoding - String!: the encoding to use, null means platform default

Exceptions

NullPointerException - if output is null

IOException - if an I/O error occurs

Since
Commons IO 1.1