org.gwe.drivers.fileSystems
Class FileHandle
java.lang.Object
org.gwe.drivers.ResourceHandle
org.gwe.drivers.fileSystems.FileHandle
- Direct Known Subclasses:
- HTTPHandle, JSchHandle, VfsHandle
public abstract class FileHandle
- extends ResourceHandle
- Since:
- Jan 24, 2007
- Author:
- Marco Ruiz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileHandle
public FileHandle(ResourceLink<FileHandle> link)
getURI
public ThinURI getURI()
isDirectory
public abstract boolean isDirectory()
throws HandleOperationException
- Returns:
- is this a directory?
- Throws:
HandleOperationException
- - system-level error.
getInputStream
public abstract java.io.InputStream getInputStream()
throws HandleOperationException
- Throws:
HandleOperationException
getOutputStream
public abstract java.io.OutputStream getOutputStream()
throws HandleOperationException
- Throws:
HandleOperationException
createFolder
public abstract void createFolder()
throws HandleOperationException
- Throws:
HandleOperationException
exists
public abstract boolean exists()
throws HandleOperationException
- Throws:
HandleOperationException
delete
public boolean delete()
throws HandleOperationException
- Throws:
HandleOperationException
isGlob
public boolean isGlob()
readObject
public <OBJECT_TYPE> OBJECT_TYPE readObject()
throws HandleOperationException
- Throws:
HandleOperationException
storeObject
public void storeObject(java.lang.Object toSerialize)
throws HandleOperationException
- Throws:
HandleOperationException
copyTo
public void copyTo(FileHandle otherFile)
throws HandleOperationException
- Throws:
HandleOperationException
copyToDir
protected void copyToDir(FileHandle otherFile)
throws HandleOperationException
- Throws:
HandleOperationException
createCompressedCopyHandle
protected FileHandle createCompressedCopyHandle(boolean createFile)
throws HandleOperationException
- Throws:
HandleOperationException
decompressInto
protected void decompressInto(FileHandle otherFile,
java.lang.String directoryName)
throws HandleOperationException
- Throws:
HandleOperationException
getChildren
public abstract FileHandle[] getChildren()
throws HandleOperationException
- The equivalent of "ls" in a directory.
- Returns:
- a list of files in the directory.
- Throws:
HandleOperationException
- - system-level error.
getSize
public abstract long getSize()
throws HandleOperationException
- Returns:
- number of bytes in the file
- Throws:
HandleOperationException
- - system-level error.
getPath
public java.lang.String getPath()
main
public static void main(java.lang.String[] args)
throws CredentialNotFoundException,
HandleOperationException,
java.io.IOException
- Throws:
CredentialNotFoundException
HandleOperationException
java.io.IOException
Copyright © 2007-2009. All Rights Reserved.