Liking cljdoc? Tell your friends :D

jdk.io.StringWriter

A character stream that collects its output in a string buffer, which can then be used to construct a string.

Closing a StringWriter has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.

A character stream that collects its output in a string buffer, which can
then be used to construct a string.

Closing a StringWriter has no effect. The methods in this class
can be called after the stream has been closed without generating an
IOException.
raw docstring

->string-writerclj

(->string-writer)
(->string-writer initial-size)

Constructor.

Create a new string writer using the specified initial string-buffer size.

initial-size - The number of char values that will fit into this buffer before it is automatically expanded - int

throws: java.lang.IllegalArgumentException - If initialSize is negative

Constructor.

Create a new string writer using the specified initial string-buffer
 size.

initial-size - The number of char values that will fit into this buffer before it is automatically expanded - `int`

throws: java.lang.IllegalArgumentException - If initialSize is negative
raw docstring

appendclj

(append this csq)
(append this csq start end)

Appends a subsequence of the specified character sequence to this writer.

An invocation of this method of the form out.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation

 out.write(csq.subSequence(start, end).toString())

csq - The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null". - java.lang.CharSequence start - The index of the first character in the subsequence - int end - The index of the character following the last character in the subsequence - int

returns: This writer - java.io.StringWriter

throws: java.lang.IndexOutOfBoundsException - If start or end are negative, start is greater than end, or end is greater than csq.length()

Appends a subsequence of the specified character sequence to this writer.

  An invocation of this method of the form out.append(csq, start,
 end) when csq is not null, behaves in
 exactly the same way as the invocation



     out.write(csq.subSequence(start, end).toString())

csq - The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null". - `java.lang.CharSequence`
start - The index of the first character in the subsequence - `int`
end - The index of the character following the last character in the subsequence - `int`

returns: This writer - `java.io.StringWriter`

throws: java.lang.IndexOutOfBoundsException - If start or end are negative, start is greater than end, or end is greater than csq.length()
raw docstring

closeclj

(close this)

Closing a StringWriter has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.

throws: java.io.IOException - If an I/O error occurs

Closing a StringWriter has no effect. The methods in this
 class can be called after the stream has been closed without generating
 an IOException.

throws: java.io.IOException - If an I/O error occurs
raw docstring

flushclj

(flush this)

Flush the stream.

Flush the stream.
raw docstring

get-bufferclj

(get-buffer this)

Return the string buffer itself.

returns: StringBuffer holding the current buffer value. - java.lang.StringBuffer

Return the string buffer itself.

returns: StringBuffer holding the current buffer value. - `java.lang.StringBuffer`
raw docstring

to-stringclj

(to-string this)

Return the buffer's current value as a string.

returns: a string representation of the object. - java.lang.String

Return the buffer's current value as a string.

returns: a string representation of the object. - `java.lang.String`
raw docstring

writeclj

(write this c)
(write this cbuf off len)

Write a portion of an array of characters.

cbuf - Array of characters - char[] off - Offset from which to start writing characters - int len - Number of characters to write - int

Write a portion of an array of characters.

cbuf - Array of characters - `char[]`
off - Offset from which to start writing characters - `int`
len - Number of characters to write - `int`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close