public class TaggedData
extends java.lang.Object
implements java.io.Closeable
| Constructor and Description |
|---|
TaggedData(java.lang.String tag,
java.io.InputStream inputStream)
Deprecated.
|
TaggedData(java.lang.String tag,
java.io.InputStream inputStream,
int responseCode)
Deprecated.
|
TaggedData(java.lang.String tag,
java.io.InputStream inputStream,
int responseCode,
long modified,
java.net.URI url)
Deprecated.
|
TaggedData(java.net.URI url,
int responseCode,
java.io.File file) |
TaggedData(java.net.URLConnection con,
java.io.InputStream in) |
TaggedData(java.net.URLConnection con,
java.io.InputStream in,
java.io.File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.net.URLConnection |
getConnection() |
java.io.File |
getFile() |
java.io.InputStream |
getInputStream()
Returns the input stream containing the resource data.
|
long |
getModified() |
int |
getResponseCode() |
State |
getState() |
java.lang.String |
getTag()
Returns the ETag for the retrieved resource, or
null if the ETag
was not provided by the server. |
java.net.URI |
getUrl() |
boolean |
hasPayload() |
boolean |
isNotFound() |
boolean |
isNotModified() |
boolean |
isOk() |
void |
throwIt() |
java.lang.String |
toString() |
@Deprecated
public TaggedData(java.lang.String tag,
java.io.InputStream inputStream,
int responseCode,
long modified,
java.net.URI url)
@Deprecated
public TaggedData(java.lang.String tag,
java.io.InputStream inputStream,
int responseCode)
@Deprecated
public TaggedData(java.lang.String tag,
java.io.InputStream inputStream)
public TaggedData(java.net.URLConnection con,
java.io.InputStream in)
throws java.lang.Exception
java.lang.Exceptionpublic TaggedData(java.net.URLConnection con,
java.io.InputStream in,
java.io.File file)
throws java.lang.Exception
java.lang.Exceptionpublic TaggedData(java.net.URI url,
int responseCode,
java.io.File file)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getTag()
null if the ETag
was not provided by the server.public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionpublic int getResponseCode()
public long getModified()
public boolean hasPayload()
throws java.io.IOException
java.io.IOExceptionpublic java.net.URI getUrl()
public java.net.URLConnection getConnection()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isOk()
public boolean isNotModified()
public void throwIt()
public State getState()
public boolean isNotFound()
public java.io.File getFile()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionCopyright (c) aQute SARL (2000, 2017) and others. All Rights Reserved.