Class ContentStreamWriter


  • public class ContentStreamWriter
    extends java.lang.Object
    A class that will take a list of tokens and write out a stream with them.
    Version:
    $Revision: 1.8 $
    Author:
    Ben Litchfield
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static byte[] EOL
      standard line separator
      static byte[] SPACE
      space character.
    • Constructor Summary

      Constructors 
      Constructor Description
      ContentStreamWriter​(java.io.OutputStream out)
      This will create a new content stream writer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void writeTokens​(java.util.List tokens)
      This will write out the list of tokens to the stream.
      void writeTokens​(java.util.List tokens, int start, int end)
      This will write out the list of tokens to the stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SPACE

        public static final byte[] SPACE
        space character.
      • EOL

        public static final byte[] EOL
        standard line separator
    • Constructor Detail

      • ContentStreamWriter

        public ContentStreamWriter​(java.io.OutputStream out)
        This will create a new content stream writer.
        Parameters:
        out - The stream to write the data to.
    • Method Detail

      • writeTokens

        public void writeTokens​(java.util.List tokens,
                                int start,
                                int end)
                         throws java.io.IOException
        This will write out the list of tokens to the stream.
        Parameters:
        tokens - The tokens to write to the stream.
        start - The start index into the list of tokens.
        end - The end index into the list of tokens.
        Throws:
        java.io.IOException - If there is an error writing to the stream.
      • writeTokens

        public void writeTokens​(java.util.List tokens)
                         throws java.io.IOException
        This will write out the list of tokens to the stream.
        Parameters:
        tokens - The tokens to write to the stream.
        Throws:
        java.io.IOException - If there is an error writing to the stream.