Writable

Interface

An element that can be written directly to a stream or given to a writer. If no charset is given, the default charset should be used.

Modifiers

public abstract

Methods


write (OutputStream, Charset)

Abstract Method

Write the element's content to the stream, using the given charset if necessary.

This can be used for String to byte array conversion:

stream.write(string.getBytes(charset));
IndexTypeName
1OutputStreamstream
2Charsetcharset
Return Type

void

Modifiers

public abstract

// Randomly-generated example
writable.write(stream, charset);