Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lutris.mime.tests
Class RandomInputStream  view RandomInputStream download RandomInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended bycom.lutris.mime.tests.RandomInputStream
All Implemented Interfaces:
java.io.Closeable

class RandomInputStream
extends java.io.InputStream


Field Summary
(package private)  long bytesLeft
           
(package private)  boolean isPrintable
           
(package private)  java.util.Random rand
           
 
Constructor Summary
RandomInputStream(long length, boolean printable)
           
 
Method Summary
 int read()
          This method reads an unsigned byte from the input stream and returns it as an int in the range of 0-255.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bytesLeft

long bytesLeft

rand

java.util.Random rand

isPrintable

boolean isPrintable
Constructor Detail

RandomInputStream

public RandomInputStream(long length,
                         boolean printable)
Method Detail

read

public int read()
Description copied from class: java.io.InputStream
This method reads an unsigned byte from the input stream and returns it as an int in the range of 0-255. This method also will return -1 if the end of the stream has been reached.

This method will block until the byte can be read.