Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor and description |
---|
StringBufferWriter
(StringBuffer buffer) Create a new string writer which will append the text to the given StringBuffer |
Type | Name and description |
---|---|
void |
close() Closing a StringWriter has no effect. |
void |
flush() Flush the stream. |
String |
toString() Return the buffer's current value as a string. |
void |
write(int c) Write a single character. |
void |
write(char[] text, int offset, int length) Write a portion of an array of characters. |
void |
write(String text) Write a string. |
void |
write(String text, int offset, int length) Write a portion of a string. |
Methods inherited from class | Name |
---|---|
class Writer |
append, append, append, append, append, append, write, write, write, write, write, close, flush, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Create a new string writer which will append the text to the given StringBuffer
Closing a StringWriter has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.
Flush the stream.
Return the buffer's current value as a string.
Write a single character.
Write a portion of an array of characters.
text
- Array of charactersoffset
- Offset from which to start writing characterslength
- Number of characters to writeWrite a string.
Write a portion of a string.
text
- the text to be writtenoffset
- offset from which to start writing characterslength
- Number of characters to writeCopyright © 2003-2015 The Apache Software Foundation. All rights reserved.