Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.core.archive.compound
Class ArchiveFile

    java.lang.Object
      org.eclipse.birt.core.archive.compound.ArchiveFile

All Implemented Interfaces:
  IArchiveFile

    public class ArchiveFile

extends java.lang.Object
implements IArchiveFile

change the default format to ext2.

Field Summary
`protected IArchiveFile` | `af`
`protected java.lang.String` | `archiveName` the archive file name.
`static boolean` | `enableFileCache`
`static boolean` | `enableSystemCache`
`static int` | `FILE_CACHE_SIZE`
`static org.eclipse.birt.core.archive.cache.SystemCacheManager` | `systemCacheManager`
`protected java.lang.String` | `systemId`

Constructor Summary
`ArchiveFile(java.lang.String fileName, java.lang.String mode)`
`ArchiveFile(java.lang.String systemId, java.lang.String fileName, java.lang.String mode)`

Method Summary
`void` | `close()` close the archive.
`ArchiveEntry` | `createEntry(java.lang.String name)`
`boolean` | `exists(java.lang.String name)`
`void` | `flush()`
`java.lang.String` | `getDependId()`
`java.lang.String` | `getName()` get the archive name.
`java.lang.String` | `getSystemId()`
`static long` | `getTotalUsedCache()`
`long` | `getUsedCache()`
`java.util.List` | `listEntries(java.lang.String namePattern)`
`java.lang.Object` | `lockEntry(java.lang.String name)`
`protected void` | `openArchiveForAppending()`
`protected void` | `openArchiveForReading()`
`ArchiveEntry` | `openEntry(java.lang.String name)`
`void` | `refresh()`
`boolean` | `removeEntry(java.lang.String name)`
`void` | `save()` save the file.
`void` | `saveAs(java.lang.String fileName)` save the
`void` | `setCacheSize(long cacheSize)`
`static void` | `setTotalCacheSize(long size)`
`void` | `unlockEntry(java.lang.Object locker)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### enableSystemCache

    public static final boolean enableSystemCache

See Also:
  Constant Field Values

### systemCacheManager

    public static final org.eclipse.birt.core.archive.cache.SystemCacheManager systemCacheManager

### enableFileCache

    public static final boolean enableFileCache

See Also:
  Constant Field Values

### FILE_CACHE_SIZE

    public static final int FILE_CACHE_SIZE

See Also:
  Constant Field Values

### archiveName

    protected java.lang.String archiveName

  the archive file name.

### systemId

    protected java.lang.String systemId

### af

    protected IArchiveFile af

Constructor Detail

### ArchiveFile

    public ArchiveFile(java.lang.String fileName,
                       java.lang.String mode)
                throws java.io.IOException

Throws:
  `java.io.IOException`

### ArchiveFile

    public ArchiveFile(java.lang.String systemId,
                       java.lang.String fileName,
                       java.lang.String mode)
                throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### openArchiveForReading

    protected void openArchiveForReading()
                                  throws java.io.IOException

  Throws:
    `java.io.IOException`

### openArchiveForAppending

    protected void openArchiveForAppending()
                                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### getName

    public java.lang.String getName()

  get the archive name. the archive name is the file name used to create the archive instance.

  Specified by:
    `getName` in interface `IArchiveFile`
  Returns:
    archive name.

### getDependId

    public java.lang.String getDependId()

  Specified by:
    `getDependId` in interface `IArchiveFile`

### getSystemId

    public java.lang.String getSystemId()

  Specified by:
    `getSystemId` in interface `IArchiveFile`

### close

    public void close()
               throws java.io.IOException

  close the archive. all changed data will be flushed into disk if the file is opened for write. the file will be removed if it is opend as transient. after close, the instance can't be used any more.

  Specified by:
    `close` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

### setCacheSize

    public void setCacheSize(long cacheSize)

  Specified by:
    `setCacheSize` in interface `IArchiveFile`

### getUsedCache

    public long getUsedCache()

  Specified by:
    `getUsedCache` in interface `IArchiveFile`

### getTotalUsedCache

    public static long getTotalUsedCache()

### setTotalCacheSize

    public static void setTotalCacheSize(long size)

### saveAs

    public void saveAs(java.lang.String fileName)
                throws java.io.IOException

  save the

  Parameters:
    `fileName` -
  Throws:
    `java.io.IOException`

### save

    public void save()
              throws java.io.IOException

  save the file. If the file is transient file, after saving, it will be converts to normal file.

  Specified by:
    `save` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

### flush

    public void flush()
               throws java.io.IOException

  Specified by:
    `flush` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

### refresh

    public void refresh()
                 throws java.io.IOException

  Specified by:
    `refresh` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

### exists

    public boolean exists(java.lang.String name)

  Specified by:
    `exists` in interface `IArchiveFile`

### openEntry

    public ArchiveEntry openEntry(java.lang.String name)
                           throws java.io.IOException

  Specified by:
    `openEntry` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

### listEntries

    public java.util.List listEntries(java.lang.String namePattern)

  Specified by:
    `listEntries` in interface `IArchiveFile`

### createEntry

    public ArchiveEntry createEntry(java.lang.String name)
                             throws java.io.IOException

  Specified by:
    `createEntry` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

### removeEntry

    public boolean removeEntry(java.lang.String name)
                        throws java.io.IOException

  Specified by:
    `removeEntry` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

### lockEntry

    public java.lang.Object lockEntry(java.lang.String name)
                               throws java.io.IOException

  Specified by:
    `lockEntry` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

### unlockEntry

    public void unlockEntry(java.lang.Object locker)
                     throws java.io.IOException

  Specified by:
    `unlockEntry` in interface `IArchiveFile`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.