org.n52.security.common.util
Class StringInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.n52.security.common.util.StringInputStream
All Implemented Interfaces:
java.io.Closeable

public class StringInputStream
extends java.io.InputStream

Tasks of Class StringInputStream.

  1. This is a Low Memory Implementation to convert a String in a InputStream
  2. It converts only CHAR_BUFFER_SIZE chars at once

Author:
reiprecht

Constructor Summary
StringInputStream(java.lang.String pContent, java.lang.String pCharset)
           
 
Method Summary
 int available()
           
 int read()
           
 void reset()
           
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, read, read, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringInputStream

public StringInputStream(java.lang.String pContent,
                         java.lang.String pCharset)
                  throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.InputStream
Throws:
java.io.IOException


Copyright © 2004-2009 52north.org. All Rights Reserved.