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
IOException
public String getName()
getName
in interface VirtualFile
public String getNameForReporting()
VirtualFile
getNameForReporting
in interface VirtualFile
public String getURL()
VirtualFile
getURL
in interface VirtualFile
public String getParent()
getParent
in interface VirtualFile
public boolean isDirectory()
isDirectory
in interface VirtualFile
public long size()
size
in interface VirtualFile
public String getMimeType()
getMimeType
in interface VirtualFile
public InputStream getInputStream() throws IOException
getInputStream
in interface VirtualFile
IOException
public byte[] toByteArray() throws IOException
VirtualFile
toByteArray
in interface VirtualFile
IOException
public long getLastModified()
getLastModified
in interface VirtualFile
public VirtualFile resolve(String relative)
resolve
in interface SinglePathResolver
public void close()
close
in interface VirtualFile
public boolean equals(Object obj)
VirtualFile
equals
in interface VirtualFile
equals
in class Object
public int hashCode()
VirtualFile
hashCode
in interface VirtualFile
hashCode
in class Object
public boolean isTextBased()
VirtualFile
isTextBased
in interface VirtualFile
Copyright © 2016 The Apache Software Foundation. All rights reserved.