TrueZIP 6.8.2

de.schlichtherle.io.archive.spi
Class RfsEntry

java.lang.Object
  extended by de.schlichtherle.io.archive.spi.RfsEntry
All Implemented Interfaces:
ArchiveEntry

public class RfsEntry
extends Object
implements ArchiveEntry

A utility class which adapts a File instance to an ArchiveEntry (RFS means Real File System).

Since:
TrueZIP 6.5
Version:
$Id: RfsEntry.java 06f3ba684701 2010/11/04 01:15:55 christian $
Author:
Christian Schlichtherle

Field Summary
private  String entryName
           
private  File file
           
 
Fields inherited from interface de.schlichtherle.io.archive.spi.ArchiveEntry
SEPARATOR, SEPARATOR_CHAR, UNKNOWN
 
Constructor Summary
RfsEntry(File file)
          Constructs a new RfsEntry.
RfsEntry(File file, String entryName)
          Constructs a new RfsEntry.
 
Method Summary
 Icon getClosedIcon()
          Returns null.
 File getFile()
          Returns the adapted file.
 ArchiveEntryMetaData getMetaData()
          Returns null.
 String getName()
          Returns the name provided to the constructor.
private static String getName(File file)
           
 Icon getOpenIcon()
          Returns null.
 long getSize()
          Returns the file size.
 long getTime()
          Returns the file's last modification time.
 boolean isDirectory()
          Returns whether the file is a directory or not.
 void setMetaData(ArchiveEntryMetaData metaData)
          A no-op: Does nothing.
 void setTime(long time)
          Sets the file's last modification time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entryName

private final String entryName

file

private final File file
Constructor Detail

RfsEntry

public RfsEntry(File file)
Constructs a new RfsEntry. This constructor uses the file's path to build a valid entry name.

Parameters:
file - A valid File instance.
Throws:
NullPointerException - If file is null.

RfsEntry

public RfsEntry(File file,
                String entryName)
Constructs a new RfsEntry.

Parameters:
file - A valid File instance.
entryName - A valid archive entry name.
Throws:
NullPointerException - If any parameter is null.
See Also:
Requirements for Archive Entry Names
Method Detail

getFile

public File getFile()
Returns the adapted file.


getName

private static String getName(File file)

getName

public String getName()
Returns the name provided to the constructor.

Specified by:
getName in interface ArchiveEntry
Returns:
A valid archive entry name.
See Also:
Requirements for Archive Entry Names

isDirectory

public boolean isDirectory()
Returns whether the file is a directory or not.

Specified by:
isDirectory in interface ArchiveEntry

getSize

public long getSize()
Returns the file size.

Specified by:
getSize in interface ArchiveEntry

getTime

public long getTime()
Returns the file's last modification time.

Specified by:
getTime in interface ArchiveEntry
See Also:
ArchiveEntry.setTime(long)

setTime

public void setTime(long time)
Sets the file's last modification time.

Specified by:
setTime in interface ArchiveEntry
Parameters:
time - The last modification time of this archive entry in milliseconds since the epoch.
See Also:
ArchiveEntry.getTime()

getOpenIcon

public Icon getOpenIcon()
Returns null.

Specified by:
getOpenIcon in interface ArchiveEntry

getClosedIcon

public Icon getClosedIcon()
Returns null.

Specified by:
getClosedIcon in interface ArchiveEntry

getMetaData

public ArchiveEntryMetaData getMetaData()
Returns null.

Specified by:
getMetaData in interface ArchiveEntry

setMetaData

public void setMetaData(ArchiveEntryMetaData metaData)
A no-op: Does nothing.

Specified by:
setMetaData in interface ArchiveEntry
Parameters:
metaData - The meta data - may not be null.

TrueZIP 6.8.2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.