public class HTTPHandle extends AbstractSeekableStreamHandle<HTTPLocation>
DataHandle for a HTTPLocation.DataHandle.ByteOrderDEFAULT_BLOCK_SIZE, MAX_SEARCH_SIZE| Constructor and Description |
|---|
HTTPHandle() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Tests whether this handle's location actually exists at the source.
|
Class<HTTPLocation> |
getType()
Gets the type associated with the object.
|
InputStream |
in()
Gets an input stream for reading data, positioned at the current offset.
|
boolean |
isReadable()
Gets whether reading from this handle is supported.
|
boolean |
isWritable()
Gets whether writing to this handle is supported.
|
Date |
lastModified()
Gets the last modified timestamp of the location.
|
long |
length()
Returns the length of the data in bytes.
|
OutputStream |
out()
Gets an output stream for writing data, positioned at the current offset.
|
protected boolean |
recreatePossible()
In some implementations of this class, the ability to recreate the stream
depends on external factors (e.g.
|
void |
recreateStreamFromPos(long pos)
Reconnects to the HTTP server, requesting the content starting from the
indicated position.
|
void |
resetStream()
Resets the stream to its start.
|
void |
setLength(long length)
Sets the new length of the handle.
|
seek, setJumpCutoffoffset, setOffsetconversionBuffer, getEncoding, getOrder, setEncoding, setOrderget, setsupportsgetInfo, getPriority, setInfo, setPriority, toStringcontext, getContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadvance, close, ensureReadable, ensureWritable, jump, read, read, readByte, setOffset, write, write, writeByteavailable, checksum, conversionBuffer, findString, findString, findString, findString, getEncoding, getOrder, isBigEndian, isLittleEndian, offset, read, readBoolean, readChar, readCString, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readString, readString, readUnsignedByte, readUnsignedShort, readUTF, setEncoding, setLittleEndian, setOrder, skip, skipBytes, write, writeBoolean, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLine, writeLong, writeShort, writeUTFget, setgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic void resetStream()
throws IOException
ResettableStreamHandleIOException - If something goes wrong with the resetpublic InputStream in()
StreamHandlepublic OutputStream out()
StreamHandlepublic boolean isReadable()
DataHandlepublic boolean isWritable()
DataHandlepublic boolean exists()
throws IOException
DataHandleIOException - If something goes wrong with the existence check.public Date lastModified() throws IOException
DataHandleIOException - If something goes wrong with the last modified check.public long length()
throws IOException
DataHandleIOExceptionpublic void setLength(long length)
throws IOException
DataHandlelength - New length.IOException - If there is an error changing the handle's length.public Class<HTTPLocation> getType()
Typedpublic void recreateStreamFromPos(long pos)
throws IOException
recreateStreamFromPos in class AbstractSeekableStreamHandle<HTTPLocation>pos - the new start positionIOExceptionprotected boolean recreatePossible()
throws IOException
AbstractSeekableStreamHandlerecreatePossible in class AbstractSeekableStreamHandle<HTTPLocation>IOExceptionCopyright © 2015–2022 SciJava. All rights reserved.