|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucsb.nceas.morpho.util.IOUtil
General static utilities for IO operations
Method Summary | |
static java.lang.StringBuffer |
getAsStringBuffer(java.io.Reader reader,
boolean closeWhenFinished)
reads character data from the Reader provided, using a
buffered read. |
static java.lang.String |
getStringArrayAsString(java.lang.String[] stringArray)
Given an array of String objects, returns the array
elements as a single string, formatted as a "list" for printing to
command line or logging |
static void |
writeToWriter(java.lang.StringBuffer buffer,
java.io.Writer writer,
boolean closeWhenFinished)
reads character data from the StringBuffer provided, and
writes it to the Writer provided, using a buffered write. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.StringBuffer getAsStringBuffer(java.io.Reader reader, boolean closeWhenFinished) throws java.io.IOException
Reader
provided, using a
buffered read. Returns data as a StringBufer
reader
- Reader
object to be readcloseWhenFinished
- boolean
value to indicate
whether Reader should be closed when reading
finished
StringBuffer
containing
characters read from the Reader
java.io.IOException
- if there are problems accessing or using the Reader.public static void writeToWriter(java.lang.StringBuffer buffer, java.io.Writer writer, boolean closeWhenFinished) throws java.io.IOException
StringBuffer
provided, and
writes it to the Writer
provided, using a buffered write.
buffer
- StringBuffer
whose contents are
to be written to the Writer
writer
- java.io.Writer
where contents
of StringBuffer are to be writtencloseWhenFinished
- boolean
value to indicate
whether Reader should be closed when reading
finished
StringBuffer
containing
characters read from the Reader
java.io.IOException
- if there are problems accessing or using the Writer.public static java.lang.String getStringArrayAsString(java.lang.String[] stringArray)
String
objects, returns the array
elements as a single string, formatted as a "list" for printing to
command line or logging
stringArray
- an array of String
objects
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |