org.xwt.util
Class CAB

java.lang.Object
  extended byorg.xwt.util.CAB

public class CAB
extends java.lang.Object

Reads a CAB file structure


Nested Class Summary
static class CAB.CABException
           
static class CAB.CFFILE
          Encapsulates a CFFILE entry
static class CAB.CFFOLDER
          Encapsulates a CFFOLDER entry
static class CAB.CFHEADER
          Encapsulates a CFHEADER entry
 
Constructor Summary
CAB()
           
 
Method Summary
static java.io.InputStream getFileInputStream(java.io.InputStream is, int skipHeaders, java.lang.String fileName)
           
static java.io.InputStream getFileInputStream(java.io.InputStream is, java.lang.String fileName)
          reads a CAB file, parses it, and returns an InputStream representing the named file
static byte[] isToByteArray(java.io.InputStream is)
          Trivial method to completely read an InputStream
static int readLittleInt(java.io.DataInputStream dis)
           
static int readLittleShort(java.io.DataInputStream dis)
           
static java.lang.String readZeroTerminatedString(java.io.DataInputStream dis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CAB

public CAB()
Method Detail

getFileInputStream

public static java.io.InputStream getFileInputStream(java.io.InputStream is,
                                                     java.lang.String fileName)
                                              throws java.io.IOException,
                                                     java.io.EOFException
reads a CAB file, parses it, and returns an InputStream representing the named file

Throws:
java.io.IOException
java.io.EOFException

getFileInputStream

public static java.io.InputStream getFileInputStream(java.io.InputStream is,
                                                     int skipHeaders,
                                                     java.lang.String fileName)
                                              throws java.io.IOException,
                                                     java.io.EOFException
Throws:
java.io.IOException
java.io.EOFException

readZeroTerminatedString

public static java.lang.String readZeroTerminatedString(java.io.DataInputStream dis)
                                                 throws java.io.IOException
Throws:
java.io.IOException

readLittleInt

public static int readLittleInt(java.io.DataInputStream dis)
                         throws java.io.IOException
Throws:
java.io.IOException

readLittleShort

public static int readLittleShort(java.io.DataInputStream dis)
                           throws java.io.IOException
Throws:
java.io.IOException

isToByteArray

public static byte[] isToByteArray(java.io.InputStream is)
                            throws java.io.IOException
Trivial method to completely read an InputStream

Throws:
java.io.IOException