Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.neuron.jaffer
Class AppleDouble  view AppleDouble download AppleDouble.java

java.lang.Object
  extended byjava.io.RandomAccessFile
      extended bycom.neuron.jaffer.AppleDouble
All Implemented Interfaces:
java.io.DataInput, java.io.DataOutput

class AppleDouble
extends java.io.RandomAccessFile


Field Summary
static int ENTRIES
           
static int ID_FINDER
           
static int ID_RESOURCE
           
static int LEN_FINDER
           
static int MAGIC
           
static int OFF_ENTRIES
           
static int OFF_FINDER
           
static int OFF_MAGIC
           
static int OFF_RES_LEN
           
static int OFF_RESOURCE
           
static int OFF_VERSION
           
static int VERSION
           
 
Fields inherited from class java.io.RandomAccessFile
 
Constructor Summary
(package private) AppleDouble(java.io.File file, java.lang.String mode)
           
 
Method Summary
 void close()
          This method closes the file and frees up all file related system resources.
 long length()
          This method returns the length of the file in bytes
 void readFinderInfo(byte[] b)
           
 long realLength()
           
 void realSeek(long off)
           
 void seek(long off)
          This method sets the current file position to the specified offset from the beginning of the file.
 void setLength(long len)
          This method sets the length of the file to the specified length.
 void write(byte[] data, int off, int len)
          This method writes len bytes to the file from the specified array starting at index offset into the array.
 void writeFinderInfo(byte[] b)
           
 
Methods inherited from class java.io.RandomAccessFile
getChannel, getFD, getFilePointer, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAGIC

public static final int MAGIC
See Also:
Constant Field Values

VERSION

public static final int VERSION
See Also:
Constant Field Values

ENTRIES

public static final int ENTRIES
See Also:
Constant Field Values

OFF_MAGIC

public static final int OFF_MAGIC
See Also:
Constant Field Values

OFF_VERSION

public static final int OFF_VERSION
See Also:
Constant Field Values

OFF_ENTRIES

public static final int OFF_ENTRIES
See Also:
Constant Field Values

OFF_FINDER

public static final int OFF_FINDER
See Also:
Constant Field Values

OFF_RESOURCE

public static final int OFF_RESOURCE
See Also:
Constant Field Values

OFF_RES_LEN

public static final int OFF_RES_LEN
See Also:
Constant Field Values

LEN_FINDER

public static final int LEN_FINDER
See Also:
Constant Field Values

ID_FINDER

public static final int ID_FINDER
See Also:
Constant Field Values

ID_RESOURCE

public static final int ID_RESOURCE
See Also:
Constant Field Values
Constructor Detail

AppleDouble

AppleDouble(java.io.File file,
            java.lang.String mode)
      throws java.io.IOException
Method Detail

writeFinderInfo

public void writeFinderInfo(byte[] b)
                     throws java.io.IOException

readFinderInfo

public void readFinderInfo(byte[] b)
                    throws java.io.IOException

realSeek

public void realSeek(long off)
              throws java.io.IOException

realLength

public long realLength()
                throws java.io.IOException

seek

public void seek(long off)
          throws java.io.IOException
Description copied from class: java.io.RandomAccessFile
This method sets the current file position to the specified offset from the beginning of the file. Note that some operating systems will allow the file pointer to be set past the current end of the file.


length

public long length()
            throws java.io.IOException
Description copied from class: java.io.RandomAccessFile
This method returns the length of the file in bytes


write

public void write(byte[] data,
                  int off,
                  int len)
           throws java.io.IOException
Description copied from class: java.io.RandomAccessFile
This method writes len bytes to the file from the specified array starting at index offset into the array.


setLength

public void setLength(long len)
               throws java.io.IOException
Description copied from class: java.io.RandomAccessFile
This method sets the length of the file to the specified length. If the currently length of the file is longer than the specified length, then the file is truncated to the specified length (the file position is set to the end of file in this case). If the current length of the file is shorter than the specified length, the file is extended with bytes of an undefined value (the file position is unchanged in this case).

The file must be open for write access for this operation to succeed.


close

public void close()
           throws java.io.IOException
Description copied from class: java.io.RandomAccessFile
This method closes the file and frees up all file related system resources. Since most operating systems put a limit on how many files may be opened at any given time, it is a good idea to close all files when no longer needed to avoid hitting this limit