org.jclouds.util
Class InputStreamChain
java.lang.Object
java.io.InputStream
org.jclouds.util.InputStreamChain
- All Implemented Interfaces:
- Closeable
public class InputStreamChain
- extends InputStream
InputStream
implementation that allows chaining of various streams for seamless
sequential reading
- Author:
- Adrian Cole, Tomas Varaneckas
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputStreamChain
public InputStreamChain(InputStream... inputStreams)
addInputStream
public InputStreamChain addInputStream(InputStream stream)
- Adds input stream to the end of chain
- Parameters:
stream
- InputStream to add to chain
- Returns:
- instance of self (for fluent calls)
addAsInputStream
public InputStreamChain addAsInputStream(String value)
- Adds a String to the end of chain
- Parameters:
value
- String to add to the chain
- Returns:
- instance of self (for fluent calls)
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
available
public int available()
throws IOException
- Overrides:
available
in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class InputStream
mark
public void mark(int i)
- Overrides:
mark
in class InputStream
reset
public void reset()
throws IOException
- Overrides:
reset
in class InputStream
- Throws:
IOException
skip
public long skip(long l)
throws IOException
- Overrides:
skip
in class InputStream
- Throws:
IOException
Copyright © 2009-2012 jclouds. All Rights Reserved.