@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()
InputEntry
IOSocket.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()
FsEntry
null
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 FsEntry
null
if and only if this is not a
directory entry.public String getName()
FsEntry
file system entry name
.getName
in interface Entry
getName
in class FsEntry
file system entry name
.EntryName.create(URI)
public OutputSocket<HttpEntry> getOutputSocket()
OutputEntry
IOSocket.getLocalTarget()
of the returned socket
must return this entry.getOutputSocket
in interface OutputEntry<HttpEntry>
protected OutputStream getOutputStream() throws IOException
IOException
public long getSize(Entry.Size type)
Entry
Entry.Type.FILE
entries.getSize
in interface Entry
type
- the type of the size to return.Entry.UNKNOWN
if not specified or the type is unsupported.public long getTime(Entry.Access type)
Entry
public 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)
FsEntry
true
if and only if this file system entry implements
the given type.isType
in class FsEntry
type
- 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–2018 Schlichtherle IT Services. All rights reserved.