All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.io.ChunkWriter
java.lang.Object
|
+----java.io.Writer
|
+----java.io.FilterWriter
|
+----sdsu.io.ChunkWriter
- public class ChunkWriter
- extends FilterWriter
A chunk is any sequence of characters you wish. A chunk could be a
single line, a table, or a complete document. The ChunkWriter
separates chunks with a string separator, called a chunk seperator.
This allows other classes (ChunkReader for example) to determine
where one chunk ends and another begins. Currently the ChunkWriter
does not check chunks for occurences of the chunk separator,
so select seperator strings that will not occur in your chunks.
Future versions of the ChunkWriter will escape occurances of the
seperator in the chunk.
The writeChunk methods will end a chunk. All other writes methods
(inherited from FilterWriter) add to the current chunk.
- Version:
- 0.5 7 January 1998
- Author:
- Roger Whitney
(whitney@cs.sdsu.edu)
-
ChunkWriter(Writer, String)
- Create a new ChunkWriter
-
setChunkSeparator(String)
-
-
writeChunk()
- Writes the chunkSeperator to end the current chunk
-
writeChunk(String)
- Writes the string chunk and a chunkSeperator to end
the current chunk
ChunkWriter
public ChunkWriter(Writer out,
String chunkSeparator)
- Create a new ChunkWriter
- Parameters:
- out - Writer the ChunkWriter will writer to
- chunkSeparator - The string that will placed between chunks.
chunkSeparator should be at least two characters. Select a string
that is not likely to occur in your chunks.
setChunkSeparator
public void setChunkSeparator(String newSeparator)
writeChunk
public void writeChunk(String chunk) throws IOException
- Writes the string chunk and a chunkSeperator to end
the current chunk
writeChunk
public void writeChunk() throws IOException
- Writes the chunkSeperator to end the current chunk
All Packages Class Hierarchy This Package Previous Next Index