public class TaggedData extends Object implements Closeable
Constructor and Description |
---|
TaggedData(String tag,
InputStream inputStream)
Deprecated.
|
TaggedData(String tag,
InputStream inputStream,
int responseCode)
Deprecated.
|
TaggedData(String tag,
InputStream inputStream,
int responseCode,
long modified,
URI url)
Deprecated.
|
TaggedData(URI url,
int responseCode,
File file) |
TaggedData(URLConnection con,
InputStream in) |
TaggedData(URLConnection con,
InputStream in,
File file) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
URLConnection |
getConnection() |
File |
getFile() |
InputStream |
getInputStream()
Returns the input stream containing the resource data.
|
long |
getModified() |
int |
getResponseCode() |
State |
getState() |
String |
getTag()
Returns the ETag for the retrieved resource, or
null if the ETag
was not provided by the server. |
URI |
getUrl() |
boolean |
hasPayload() |
boolean |
isNotFound() |
boolean |
isNotModified() |
boolean |
isOk() |
void |
throwIt() |
String |
toString() |
@Deprecated public TaggedData(String tag, InputStream inputStream, int responseCode, long modified, URI url)
@Deprecated public TaggedData(String tag, InputStream inputStream, int responseCode)
@Deprecated public TaggedData(String tag, InputStream inputStream)
public TaggedData(URLConnection con, InputStream in) throws Exception
Exception
public TaggedData(URLConnection con, InputStream in, File file) throws Exception
Exception
public String getTag()
null
if the ETag
was not provided by the server.public InputStream getInputStream() throws IOException
IOException
public int getResponseCode()
public long getModified()
public boolean hasPayload() throws IOException
IOException
public URI getUrl()
public URLConnection getConnection()
public boolean isOk()
public boolean isNotModified()
public void throwIt()
public State getState()
public boolean isNotFound()
public File getFile()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2021 aQute SARL. All rights reserved.