Qwylt

java.lang.module.spi
Class Streams.Out

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.DataOutputStream
              extended by java.lang.module.spi.Streams.Out
All Implemented Interfaces:
java.io.Closeable, java.io.DataOutput, java.io.Flushable
Enclosing class:
Streams

public static class Streams.Out
extends java.io.DataOutputStream

A DataOutputStream that supports archive types.


Field Summary
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
Streams.Out(java.io.OutputStream out)
          Constructor.
 
Method Summary
 void writeHeader(int magic, int major, int minor)
          Write header.
 void writeModuleID(ModuleIdentity id)
          Write a module id.
 void writeString(java.lang.String string)
          Write a string to the stream and handles the null case.
 void writeVersion(Version version)
          Write a version.
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Constructor Detail

Streams.Out

public Streams.Out(java.io.OutputStream out)
Constructor.

Parameters:
out - The stream to write to.
Method Detail

writeHeader

public void writeHeader(int magic,
                        int major,
                        int minor)
                 throws java.io.IOException
Write header.

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

writeString

public void writeString(java.lang.String string)
                 throws java.io.IOException
Write a string to the stream and handles the null case.

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

writeModuleID

public void writeModuleID(ModuleIdentity id)
                   throws java.io.IOException
Write a module id.

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

writeVersion

public void writeVersion(Version version)
                  throws java.io.IOException
Write a version.

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

Qwylt

Send comments or questions to Bryan Atsatt