Class Writers.Delimited<T extends Writer>
java.lang.Object
java.io.Writer
com.end0katz.blobj.nio.Writers.Delimited<T>
- Type Parameters:
T- the type of writer to delimit.
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
- Enclosing class:
Writers
Writer modifier that takes in a writer and, after each writing operation,
writes a set delimiter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) append(CharSequence cs) append(CharSequence cs, int off, int len) voidclose()voidflush()voidwrite(char[] cbuf) voidwrite(char[] cbuf, int off, int len) voidwrite(int c) voidvoidwriter()Get the underlying writer for queries (seeWriters.StringWriter) and non-delimited writing.Methods inherited from class java.io.Writer
nullWriter
-
Field Details
-
wr
-
delimiter
The delimiter.
-
-
Constructor Details
-
Delimited
Wrap writer, with" "as the delimiter.- Parameters:
writer- the writer to wrap.
-
Delimited
-
-
Method Details
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
writer
Get the underlying writer for queries (seeWriters.StringWriter) and non-delimited writing.- Returns:
- the underlying writer.
-