Qwylt

java.lang.module.spi
Class Streams

java.lang.Object
  extended by java.lang.module.spi.Streams

public class Streams
extends java.lang.Object

Utilities for reading and writing streams.

Since:
Mar 16, 2009
Author:
Bryan Atsatt

Nested Class Summary
static class Streams.In
          A DataInputStream that supports archive types.
static class Streams.Out
          A DataOutputStream that supports archive types.
 
Constructor Summary
Streams()
           
 
Method Summary
static java.nio.ByteBuffer read(java.io.InputStream in, int size)
          Returns the data from the specified stream as a ByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Streams

public Streams()
Method Detail

read

public static java.nio.ByteBuffer read(java.io.InputStream in,
                                       int size)
                                throws java.io.IOException
Returns the data from the specified stream as a ByteBuffer.

Parameters:
in - The input stream.
size - The number of bytes to read from the stream, or < 0 if should read to EOF.
Returns:
The data.
Throws:
java.io.IOException - if an I/O error occurs.

Qwylt

Send comments or questions to Bryan Atsatt