com.debianmirror.mirror.data
Class MirrorFile

java.lang.Object
  |
  +--com.debianmirror.mirror.data.MirrorFile

public class MirrorFile
extends java.lang.Object

Author:
E01 - Tobias Hertkorn, Jonas Jagerhok, Jamie Fitz-Gerald

Nested Class Summary
 class MirrorFile.Data
           
 class MirrorFile.InputStream
           
 
Constructor Summary
MirrorFile()
           
 
Method Summary
 MirrorFile createMirrorFile(java.lang.String fileName)
          Translates the given fileName into a local store path
If the file is not found there, it creates the remote request URL and requests the file from the RemoteDebianServer
 boolean equals(java.lang.Object obj)
          Does override the equals methode of the Object-class.
 MirrorFile.InputStream getInputStream()
          Returns the InputStream of this File
 int hashCode()
          Does override the hashCode methode of the Object-class.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MirrorFile

public MirrorFile()
Method Detail

createMirrorFile

public MirrorFile createMirrorFile(java.lang.String fileName)

Translates the given fileName into a local store path
If the file is not found there, it creates the remote request URL and requests the file from the RemoteDebianServer

Parameters:
fileName - the file name representing the requested file
Returns:
the MirrorFile associated with the given file name

getInputStream

public MirrorFile.InputStream getInputStream()

Returns the InputStream of this File

Returns:
the InputStream that contains the data of the File

equals

public boolean equals(java.lang.Object obj)

Does override the equals methode of the Object-class.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if the Object is a MirrorFile and points to the same file in the MirrorModule-Cache; false otherwise.

hashCode

public int hashCode()

Does override the hashCode methode of the Object-class. Creates an unique hashcode for every unique file in the mirrormodule-cache.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this MIrrorFile.


Copyright © 2004, Apt-Got Group