ccc.commons.streams
Class ReadToStringAction

java.lang.Object
  extended by ccc.commons.streams.ReadToStringAction
All Implemented Interfaces:
StreamAction

public final class ReadToStringAction
extends java.lang.Object
implements StreamAction

A stream action that can read a raw bytes into a string.

Author:
Civic Computing Ltd.

Constructor Summary
ReadToStringAction(java.lang.StringBuilder sb, java.lang.String charset)
          Constructor.
 
Method Summary
 void execute(java.io.InputStream is)
          Execute the action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadToStringAction

public ReadToStringAction(java.lang.StringBuilder sb,
                          java.lang.String charset)
Constructor.

Parameters:
sb - The string builder to read into.
charset - The character set to use.
Method Detail

execute

public void execute(java.io.InputStream is)
             throws java.lang.Exception
Execute the action.

Specified by:
execute in interface StreamAction
Parameters:
is - The input stream to operate on.
Throws:
java.lang.Exception - If the action fails.


Copyright © 2010. All Rights Reserved.