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 MethodWrite 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));
Index | Type | Name |
---|---|---|
1 | OutputStream | stream |
2 | Charset | charset |
Return Type
void
Modifiers
public abstract
// Randomly-generated example
writable.write(stream, charset);