us.monoid.web
Class AbstractResource
java.lang.Object
us.monoid.web.Resty
us.monoid.web.AbstractResource
- Direct Known Subclasses:
- BinaryResource, JSONResource, TextResource
public abstract class AbstractResource
- extends Resty
Abstract base class for all resource handlers you want to use with Resty.
It gives access to the underlying URLConnection and the current inputStream
- Author:
- beders
Methods inherited from class us.monoid.web.Resty |
alwaysSend, authenticate, authenticate, authenticateForRealm, bytes, bytes, bytes, bytes, content, content, content, data, data, delete, dontSend, enc, form, form, identifyAsMozilla, identifyAsResty, ignoreAllCerts, json, json, json, json, path, put, setOptions, setProxy, text, text, text, text, withHeader, xml, xml, xml, xml, xpath |
AbstractResource
public AbstractResource(Resty.Option... options)
getUrlConnection
public URLConnection getUrlConnection()
http
public HttpURLConnection http()
stream
public InputStream stream()
status
public boolean status(int responseCode)
- Check if the URLConnection has returned the specified responseCode
- Parameters:
responseCode
-
- Returns:
location
public URI location()
- Get the location header as URI. Returns null if there is no location header.
Copyright © 2013. All Rights Reserved.