Class RandomInputStream

    • Field Detail

      • remainingBytes

        protected long remainingBytes
        The number of bytes of data remaining in this random stream.
      • lengthInBytes

        protected final long lengthInBytes
        The requested amount of data contained in this random stream.
    • Constructor Detail

      • RandomInputStream

        public RandomInputStream​(long lengthInBytes)
        Constructs a new InputStream, which will return the specified amount of bytes of random ASCII characters.
        Parameters:
        lengthInBytes - The size in bytes of the total data returned by this stream.
      • RandomInputStream

        public RandomInputStream​(long lengthInBytes,
                                 boolean binaryData)
        Creates a new random input stream of specified length, and specifies whether the stream should be full on binary or character data.
        Parameters:
        lengthInBytes - The number of bytes in the stream.
        binaryData - Whether binary or character data should be generated.