org.openrdf.http.object.filters
Class MD5ValidatingChannel
java.lang.Object
org.openrdf.http.object.filters.MD5ValidatingChannel
- All Implemented Interfaces:
- Closeable, Channel, ReadableByteChannel
public class MD5ValidatingChannel
- extends Object
- implements ReadableByteChannel
Computes the MD5 sum of this stream and throws an exception if it is wrong.
MD5ValidatingChannel
public MD5ValidatingChannel(ReadableByteChannel delegate,
String md5)
throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
getContentMD5
public String getContentMD5()
isOpen
public boolean isOpen()
- Specified by:
isOpen in interface Channel
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Specified by:
close in interface Channel
- Throws:
IOException
read
public int read(ByteBuffer dst)
throws IOException
- Specified by:
read in interface ReadableByteChannel
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.