public class NetworkFile extends Object implements VirtualFile
| Constructor and Description |
|---|
NetworkFile(URL u) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Signal the hosting environment that this instance is no longer used.
|
boolean |
equals(Object obj)
Override equals().
|
InputStream |
getInputStream()
Return input stream...
|
long |
getLastModified()
Return last time the underlying source is modified.
|
String |
getMimeType()
Return mime type
|
String |
getName()
Return name...
|
String |
getNameForReporting()
Return the name to be used when reporting errors or warnings.
|
String |
getParent() |
String |
getURL()
Return an URL string of this file
|
int |
hashCode()
Override hashCode().
|
boolean |
isDirectory() |
boolean |
isTextBased()
Return true if it's text-based. toString() returns the text
|
VirtualFile |
resolve(String relative)
Return an instance of this interface which represents the specified relative path.
|
long |
size()
Return file size...
|
byte[] |
toByteArray()
Return the entire content in byte[]
|
public NetworkFile(URL u) throws IOException
IOExceptionpublic String getName()
getName in interface VirtualFilepublic String getNameForReporting()
VirtualFilegetNameForReporting in interface VirtualFilepublic String getURL()
VirtualFilegetURL in interface VirtualFilepublic String getParent()
getParent in interface VirtualFilepublic boolean isDirectory()
isDirectory in interface VirtualFilepublic long size()
size in interface VirtualFilepublic String getMimeType()
getMimeType in interface VirtualFilepublic InputStream getInputStream() throws IOException
getInputStream in interface VirtualFileIOExceptionpublic byte[] toByteArray()
throws IOException
VirtualFiletoByteArray in interface VirtualFileIOExceptionpublic long getLastModified()
getLastModified in interface VirtualFilepublic VirtualFile resolve(String relative)
resolve in interface SinglePathResolverpublic void close()
close in interface VirtualFilepublic boolean equals(Object obj)
VirtualFileequals in interface VirtualFileequals in class Objectpublic int hashCode()
VirtualFilehashCode in interface VirtualFilehashCode in class Objectpublic boolean isTextBased()
VirtualFileisTextBased in interface VirtualFileCopyright © 2016 The Apache Software Foundation. All rights reserved.