Package gov.nasa.worldwind.retrieve
Class HTTPRetriever
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.retrieve.URLRetriever
-
- gov.nasa.worldwind.retrieve.HTTPRetriever
-
- All Implemented Interfaces:
AVList
,MessageListener
,Retriever
,WWObject
,java.beans.PropertyChangeListener
,java.util.concurrent.Callable<Retriever>
,java.util.EventListener
public class HTTPRetriever extends URLRetriever
-
-
Field Summary
-
Fields inherited from class gov.nasa.worldwind.retrieve.URLRetriever
beginTime, byteBuffer, connection, connectTimeout, contentLength, contentLengthRead, contentType, endTime, expiration, EXTRACT_ZIP_ENTRY, postProcessor, readTimeout, staleRequestLimit, state, submitTime, url
-
Fields inherited from interface gov.nasa.worldwind.retrieve.Retriever
RETRIEVER_STATE_CONNECTING, RETRIEVER_STATE_ERROR, RETRIEVER_STATE_INTERRUPTED, RETRIEVER_STATE_NOT_STARTED, RETRIEVER_STATE_READING, RETRIEVER_STATE_STARTED, RETRIEVER_STATE_SUCCESSFUL
-
-
Constructor Summary
Constructors Constructor Description HTTPRetriever(java.net.URL url, RetrievalPostProcessor postProcessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.nio.ByteBuffer
doRead(java.net.URLConnection connection)
int
getResponseCode()
java.lang.String
getResponseMessage()
-
Methods inherited from class gov.nasa.worldwind.retrieve.URLRetriever
call, configureSSLContext, createRetriever, end, equals, getBeginTime, getBuffer, getConnection, getConnectTimeout, getContentLength, getContentLengthRead, getContentType, getEndTime, getExpiration, getExpirationTime, getName, getPostProcessor, getReadTimeout, getStaleRequestLimit, getState, getSubmitTime, getUrl, getURL, hashCode, interrupted, openConnection, read, readNonSpecificStream, readNonSpecificStreamUnknownLength, readZipStream, setBeginTime, setConnectTimeout, setContentLengthRead, setEndTime, setReadTimeout, setStaleRequestLimit, setState, setSubmitTime, toString
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
-
-
-
-
Constructor Detail
-
HTTPRetriever
public HTTPRetriever(java.net.URL url, RetrievalPostProcessor postProcessor)
-
-
Method Detail
-
getResponseCode
public int getResponseCode()
-
getResponseMessage
public java.lang.String getResponseMessage()
-
doRead
protected java.nio.ByteBuffer doRead(java.net.URLConnection connection) throws java.lang.Exception
- Overrides:
doRead
in classURLRetriever
- Parameters:
connection
- the connection to read from.- Returns:
- a buffer containing the content read from the connection
- Throws:
java.lang.Exception
- ifconnection
is null or an exception occurs during reading.java.lang.IllegalArgumentException
- ifconnection
is null
-
-