|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectWriter
FilterWriter
ExpandedTabWriter
public class ExpandedTabWriter
Writes characters to a stream while expanding tabs ('\t'
) into spaces.
modules/library/metadata (gt-metadata.jar)
Field Summary |
---|
Fields inherited from class FilterWriter |
---|
out |
Fields inherited from class Writer |
---|
lock |
Constructor Summary | |
---|---|
ExpandedTabWriter(Writer out)
Constructs a filter which replaces tab characters ( '\t' )
by spaces. |
|
ExpandedTabWriter(Writer out,
int tabWidth)
Constructs a filter which replaces tab characters ( '\t' )
by spaces, using the specified tab width. |
Method Summary | |
---|---|
int |
getTabWidth()
Returns the tab width. |
void |
setTabWidth(int tabWidth)
Sets the tab width. |
void |
write(char[] buffer,
int offset,
int length)
Writes a portion of an array of characters. |
void |
write(int c)
Writes a single character. |
void |
write(String string,
int offset,
int length)
Writes a portion of a string. |
Methods inherited from class FilterWriter |
---|
close, flush |
Methods inherited from class Writer |
---|
append, append, append, write, write |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpandedTabWriter(Writer out)
'\t'
)
by spaces. Tab widths default to 8 characters.
out
- A writer object to provide the underlying stream.public ExpandedTabWriter(Writer out, int tabWidth) throws IllegalArgumentException
'\t'
)
by spaces, using the specified tab width.
out
- A writer object to provide the underlying stream.tabWidth
- The tab width. Must be greater than 0.
IllegalArgumentException
- if tabWidth
is not greater than 0.Method Detail |
---|
public void setTabWidth(int tabWidth) throws IllegalArgumentException
tabWidth
- The tab width. Must be greater than 0.
IllegalArgumentException
- if tabWidth
is not greater than 0.public int getTabWidth()
public void write(int c) throws IOException
write
in class FilterWriter
IOException
- If an I/O error occurs.public void write(char[] buffer, int offset, int length) throws IOException
write
in class FilterWriter
buffer
- Buffer of characters to be writtenoffset
- Offset from which to start reading characterslength
- Number of characters to be written
IOException
- If an I/O error occurs.public void write(String string, int offset, int length) throws IOException
write
in class FilterWriter
string
- String to be writtenoffset
- Offset from which to start reading characterslength
- Number of characters to be written
IOException
- If an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |