org.gjt.convert.binhex
Class BinHex4InputStream.Header

java.lang.Object
  |
  +--org.gjt.convert.binhex.BinHex4InputStream.Header
Enclosing class:
BinHex4InputStream

public static class BinHex4InputStream.Header
extends java.lang.Object

Representation of a BinHex4 header section.


Constructor Summary
BinHex4InputStream.Header(java.io.InputStream in)
          Reads a header from a completely 8-bit clean BinHex4-Hqx8 stream.
 
Method Summary
 java.lang.String getCreator()
          Returns the creator that this file had before encoding in BinHex.
 long getDataLength()
          Returns the length of the data fork.
 java.lang.String getFileName()
          Returns the name this file had before encoding in BinHex.
 int getFlags()
          Returns the file info flags that this file had before encoding in BinHex.
 long getResourceLength()
          Returns the length of the resource fork.
 java.lang.String getType()
          Returns the type that this file had before encoding in BinHex.
 int getVersion()
          Returns the version that this file had before encoding in BinHex.
 java.lang.String toString()
          Returns the content of this header in a single informational String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinHex4InputStream.Header

public BinHex4InputStream.Header(java.io.InputStream in)
                          throws java.io.IOException
Reads a header from a completely 8-bit clean BinHex4-Hqx8 stream. (No RLE coding allowed)
Method Detail

getFileName

public java.lang.String getFileName()
Returns the name this file had before encoding in BinHex.

Since I've found no trace of a Macintosh character set converted to/from Unicode, this method converts using the locale-default character converter. This will usually only work well if your character set is ASCII for character codes 0-127. If anyone can send a converter for Mac characters to Unicode, I'll put that in here.


getType

public java.lang.String getType()
Returns the type that this file had before encoding in BinHex.

Since I've found no trace of a Macintosh character set converted to/from Unicode, this method converts using the locale-default character converter. This will usually only work well if your character set is ASCII for character codes 0-127. If anyone can send a converter for Mac characters to Unicode, I'll put that in here.


getCreator

public java.lang.String getCreator()
Returns the creator that this file had before encoding in BinHex.

Since I've found no trace of a Macintosh character set converted to/from Unicode, this method converts using the locale-default character converter. This will usually only work well if your character set is ASCII for character codes 0-127. If anyone can send a converter for Mac characters to Unicode, I'll put that in here.


getVersion

public int getVersion()
Returns the version that this file had before encoding in BinHex.

getFlags

public int getFlags()
Returns the file info flags that this file had before encoding in BinHex.

getDataLength

public long getDataLength()
Returns the length of the data fork.

getResourceLength

public long getResourceLength()
Returns the length of the resource fork.

toString

public java.lang.String toString()
Returns the content of this header in a single informational String.
Overrides:
toString in class java.lang.Object