Qwylt

java.lang.module.spi
Class Streams.In

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.DataInputStream
              extended by java.lang.module.spi.Streams.In
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput
Enclosing class:
Streams

public static class Streams.In
extends java.io.DataInputStream

A DataInputStream that supports archive types.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
Streams.In(java.io.InputStream in)
          Constructor.
 
Method Summary
 ModuleIdentity readModuleID()
          Read a module id.
 java.lang.String readString()
          Read a string or null from the stream.
 Version readVersion()
          Read a version.
 void validateHeader(int magic, int major, int minor)
          Validate header data.
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Streams.In

public Streams.In(java.io.InputStream in)
           throws java.io.IOException
Constructor.

Parameters:
in - The stream to read from.
Throws:
java.io.IOException - If an exception occurs.
Method Detail

validateHeader

public void validateHeader(int magic,
                           int major,
                           int minor)
                    throws java.io.IOException
Validate header data.

Parameters:
magic - The expected magic constant for this file.
major - The expected major version number for this file.
minor - The expected minor version number for this file.
Throws:
java.io.IOException - If an exception occurs.

readString

public java.lang.String readString()
                            throws java.io.IOException
Read a string or null from the stream.

Returns:
The string or null.
Throws:
java.io.IOException - If an exception occurs.

readModuleID

public ModuleIdentity readModuleID()
                            throws java.io.IOException
Read a module id.

Returns:
The id.
Throws:
java.io.IOException - If an exception occurs.

readVersion

public Version readVersion()
                    throws java.io.IOException
Read a version.

Returns:
The version.
Throws:
java.io.IOException - If an exception occurs.

Qwylt

Send comments or questions to Bryan Atsatt