|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.utility.io.HTTPFileSystem
public class HTTPFileSystem
Implements a read-only HTTP file system for Terrier. Files can be read directly from a URL
Constructor Summary | |
---|---|
HTTPFileSystem()
Create a new HTTPFileSystem |
Method Summary | |
---|---|
boolean |
canRead(java.lang.String filename)
returns true if filename can be read |
boolean |
canWrite(java.lang.String filename)
returns true if filename can be written to |
byte |
capabilities()
capabilities of the filesystem |
boolean |
delete(java.lang.String filename)
delete the named file |
boolean |
deleteOnExit(java.lang.String pathname)
delete the file when the JVM exits |
boolean |
exists(java.lang.String filename)
returns true if the path exists |
java.lang.String |
getParent(java.lang.String path)
whats the parent path to this path - eg directory containing a file |
boolean |
isDirectory(java.lang.String path)
returns true if path is a directory |
long |
length(java.lang.String filename)
returns the length of the specified file |
java.lang.String[] |
list(java.lang.String path)
list contents of a directory etc |
boolean |
mkdir(java.lang.String filename)
mkdir the specified path |
java.lang.String |
name()
return the name of the file system |
RandomDataInput |
openFileRandom(java.lang.String filename)
open a file for random input |
java.io.InputStream |
openFileStream(java.lang.String filename)
open a file of given filename for reading |
boolean |
rename(java.lang.String source,
java.lang.String destination)
rename a file/dir to another name, on the same file system |
java.lang.String[] |
schemes()
URI schemes supported by this class: http, ftp, https |
RandomDataOutput |
writeFileRandom(java.lang.String filename)
open a file of given filename for random writing |
java.io.OutputStream |
writeFileStream(java.lang.String filename)
open a file of given filename for writing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HTTPFileSystem()
Method Detail |
---|
public java.lang.String name()
name
in interface FileSystem
public byte capabilities()
capabilities
in interface FileSystem
public java.lang.String[] schemes()
schemes
in interface FileSystem
public boolean exists(java.lang.String filename) throws java.io.IOException
exists
in interface FileSystem
java.io.IOException
public java.io.InputStream openFileStream(java.lang.String filename) throws java.io.IOException
openFileStream
in interface FileSystem
java.io.IOException
public RandomDataInput openFileRandom(java.lang.String filename) throws java.io.IOException
openFileRandom
in interface FileSystem
java.io.IOException
public java.io.OutputStream writeFileStream(java.lang.String filename) throws java.io.IOException
writeFileStream
in interface FileSystem
java.io.IOException
public RandomDataOutput writeFileRandom(java.lang.String filename) throws java.io.IOException
writeFileRandom
in interface FileSystem
java.io.IOException
public boolean delete(java.lang.String filename) throws java.io.IOException
delete
in interface FileSystem
java.io.IOException
public boolean deleteOnExit(java.lang.String pathname) throws java.io.IOException
deleteOnExit
in interface FileSystem
java.io.IOException
public boolean mkdir(java.lang.String filename) throws java.io.IOException
mkdir
in interface FileSystem
java.io.IOException
public boolean canRead(java.lang.String filename)
canRead
in interface FileSystem
public boolean canWrite(java.lang.String filename)
canWrite
in interface FileSystem
public long length(java.lang.String filename) throws java.io.IOException
length
in interface FileSystem
java.io.IOException
public boolean isDirectory(java.lang.String path) throws java.io.IOException
isDirectory
in interface FileSystem
java.io.IOException
public boolean rename(java.lang.String source, java.lang.String destination) throws java.io.IOException
rename
in interface FileSystem
java.io.IOException
public java.lang.String getParent(java.lang.String path) throws java.io.IOException
getParent
in interface FileSystem
java.io.IOException
public java.lang.String[] list(java.lang.String path) throws java.io.IOException
list
in interface FileSystem
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |