org.openrdf.http.object.filters
Class MD5ValidatingStream
java.lang.Object
java.io.InputStream
org.openrdf.http.object.filters.MD5ValidatingStream
- All Implemented Interfaces:
- Closeable
public class MD5ValidatingStream
- extends InputStream
Computes the MD5 sum of this stream and throws an exception if it is wrong.
MD5ValidatingStream
public MD5ValidatingStream(InputStream delegate,
String md5)
throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
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
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2004-2010 James Leigh Services Inc.. All Rights Reserved.