@Immutable public class HttpEntry extends FsEntry implements IOEntry<HttpEntry>
Entry.Access, Entry.Size, Entry.Type| Modifier and Type | Field and Description |
|---|---|
protected URI |
uri |
ALL_ACCESS_SET, ALL_SIZE_SET, ALL_TYPE_SET, DIRECTORY_TYPE_SET, FILE_TYPE_SET, SPECIAL_TYPE_SET, SYMLINK_TYPE_SET, UNKNOWN| Modifier and Type | Method and Description |
|---|---|
InputSocket<HttpEntry> |
getInputSocket()
Returns an input socket for reading this entry.
|
protected InputStream |
getInputStream() |
Set<String> |
getMembers()
Returns a set of strings with the base names of the members of this
directory entry or
null if and only if this is not a directory
entry. |
String |
getName()
Returns a string representation of the
file system entry name. |
OutputSocket<HttpEntry> |
getOutputSocket()
Returns an output socket for writing this entry.
|
protected OutputStream |
getOutputStream() |
long |
getSize(Entry.Size type)
Returns the size of the given type for this entry.
|
long |
getTime(Entry.Access type)
Returns the time of the given access type for this entry.
|
Set<Entry.Type> |
getTypes()
Returns a set of types implemented by this entry.
|
boolean |
isType(Entry.Type type)
Returns
true if and only if this file system entry implements
the given type. |
protected org.apache.http.client.methods.HttpUriRequest |
newGet() |
protected org.apache.http.client.methods.HttpUriRequest |
newHead() |
protected InputSocket<HttpEntry> |
newInputSocket(BitField<FsInputOption> options) |
protected OutputSocket<HttpEntry> |
newOutputSocket(BitField<FsOutputOption> options,
Entry template) |
protected final URI uri
public InputSocket<HttpEntry> getInputSocket()
InputEntryIOSocket.getLocalTarget() of the returned socket
must return this entry.getInputSocket in interface InputEntry<HttpEntry>protected InputStream getInputStream() throws IOException
IOException@Nullable public Set<String> getMembers()
FsEntrynull if and only if this is not a directory
entry.
Whether or not modifying the returned set is supported and the effect
on the file system is implementation specific.getMembers in class FsEntrynull if and only if this is not a
directory entry.public String getName()
FsEntryfile system entry name.getName in interface EntrygetName in class FsEntryfile system entry name.EntryName.create(URI)public OutputSocket<HttpEntry> getOutputSocket()
OutputEntryIOSocket.getLocalTarget() of the returned socket
must return this entry.getOutputSocket in interface OutputEntry<HttpEntry>protected OutputStream getOutputStream() throws IOException
IOExceptionpublic long getSize(Entry.Size type)
EntryEntry.Type.FILE entries.getSize in interface Entrytype - the type of the size to return.Entry.UNKNOWN if not specified or the type is unsupported.public long getTime(Entry.Access type)
Entrypublic Set<Entry.Type> getTypes()
FsEntry
Some file system types allow an entry to implement multiple entry types.
For example, a ZIP or TAR file may contain a file entry with the name
foo and a directory entry with the name foo/.
Yes, this is strange, but shit happens!
In this case then, a virtual file system should collapse this into one
file system entry which returns true for both
isType(FILE) and isType(DIRECTORY).
public boolean isType(Entry.Type type)
FsEntrytrue if and only if this file system entry implements
the given type.isType in class FsEntrytype - the type to test.true if and only if this file system entry implements
the given type.FsEntry.getTypes()protected org.apache.http.client.methods.HttpUriRequest newGet()
protected org.apache.http.client.methods.HttpUriRequest newHead()
protected InputSocket<HttpEntry> newInputSocket(BitField<FsInputOption> options)
protected OutputSocket<HttpEntry> newOutputSocket(BitField<FsOutputOption> options, @CheckForNull Entry template)
Copyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.