|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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(String filename)
returns true if filename can be read |
boolean |
canWrite(String filename)
returns true if filename can be written to |
byte |
capabilities()
capabilities of the filesystem |
boolean |
delete(String filename)
delete the named file |
boolean |
deleteOnExit(String pathname)
delete the file when the JVM exits |
boolean |
exists(String filename)
returns true if the path exists |
String |
getParent(String path)
whats the parent path to this path - eg directory containing a file |
boolean |
isDirectory(String path)
returns true if path is a directory |
long |
length(String filename)
returns the length of the specified file |
String[] |
list(String path)
list contents of a directory etc |
boolean |
mkdir(String filename)
mkdir the specified path |
String |
name()
return the name of the file system |
RandomDataInput |
openFileRandom(String filename)
open a file for random input |
InputStream |
openFileStream(String filename)
open a file of given filename for reading |
boolean |
rename(String source,
String destination)
rename a file/dir to another name, on the same file system |
String[] |
schemes()
URI schemes supported by this class: http, ftp, https |
RandomDataOutput |
writeFileRandom(String filename)
open a file of given filename for random writing |
OutputStream |
writeFileStream(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 String name()
name in interface FileSystempublic byte capabilities()
capabilities in interface FileSystempublic String[] schemes()
schemes in interface FileSystem
public boolean exists(String filename)
throws IOException
exists in interface FileSystemIOException
public InputStream openFileStream(String filename)
throws IOException
openFileStream in interface FileSystemIOException
public RandomDataInput openFileRandom(String filename)
throws IOException
openFileRandom in interface FileSystemIOException
public OutputStream writeFileStream(String filename)
throws IOException
writeFileStream in interface FileSystemIOException
public RandomDataOutput writeFileRandom(String filename)
throws IOException
writeFileRandom in interface FileSystemIOException
public boolean delete(String filename)
throws IOException
delete in interface FileSystemIOException
public boolean deleteOnExit(String pathname)
throws IOException
deleteOnExit in interface FileSystemIOException
public boolean mkdir(String filename)
throws IOException
mkdir in interface FileSystemIOExceptionpublic boolean canRead(String filename)
canRead in interface FileSystempublic boolean canWrite(String filename)
canWrite in interface FileSystem
public long length(String filename)
throws IOException
length in interface FileSystemIOException
public boolean isDirectory(String path)
throws IOException
isDirectory in interface FileSystemIOException
public boolean rename(String source,
String destination)
throws IOException
rename in interface FileSystemIOException
public String getParent(String path)
throws IOException
getParent in interface FileSystemIOException
public String[] list(String path)
throws IOException
list in interface FileSystemIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||