org.erights.e.meta.java.io
Class InputStreamSugar

java.lang.Object
  |
  +--org.erights.e.meta.java.io.InputStreamSugar

public class InputStreamSugar
extends Object

Untamed: A sweetener defining extra messages that may be e-sent to an InputStream.

Author:
Mark S. Miller

Field Summary
private static int BUF_SIZE
           
 
Constructor Summary
private InputStreamSugar()
          prevent instantiation
 
Method Summary
static void __printOn(InputStream self, TextWriter out)
          Enabled: A InputStream prints as <InputStream>
static BigInteger getCryptoHash(InputStream self)
          Enabled: A SHA hash of the rest of the stream.
static byte[] readAvailable(InputStream self)
          Enabled: Reads the currently available bytes (presumably without blocking, since they are said to be available).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUF_SIZE

private static final int BUF_SIZE
Constructor Detail

InputStreamSugar

private InputStreamSugar()
prevent instantiation

Method Detail

getCryptoHash

public static BigInteger getCryptoHash(InputStream self)
                                throws NoSuchAlgorithmException,
                                       IOException
Enabled: A SHA hash of the rest of the stream.

NoSuchAlgorithmException
IOException

readAvailable

public static byte[] readAvailable(InputStream self)
                            throws IOException
Enabled: Reads the currently available bytes (presumably without blocking, since they are said to be available).

IOException

__printOn

public static void __printOn(InputStream self,
                             TextWriter out)
                      throws IOException
Enabled: A InputStream prints as <InputStream>

IOException


comments?