Package ej.rest.web
Class Replacement
- java.lang.Object
-
- ej.rest.web.AbstractContent
-
- ej.rest.web.Replacement
-
public class Replacement extends AbstractContent
Used in PUT operations. Wraps nicely around Content and makes sure that PUT is used instead of POST, effectively replacing the existing resource (or creating a new one, according to the holy HTTP spec.
-
-
Field Summary
-
Fields inherited from class ej.rest.web.AbstractContent
CRLF
-
-
Constructor Summary
Constructors Constructor Description Replacement(Content someContent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddContent(URLConnection con)voidwriteContent(OutputStream os)voidwriteHeader(OutputStream os)-
Methods inherited from class ej.rest.web.AbstractContent
ascii, enc
-
-
-
-
Constructor Detail
-
Replacement
public Replacement(Content someContent)
-
-
Method Detail
-
addContent
protected void addContent(URLConnection con) throws IOException
- Specified by:
addContentin classAbstractContent- Throws:
IOException
-
writeContent
public void writeContent(OutputStream os) throws IOException
- Specified by:
writeContentin classAbstractContent- Throws:
IOException
-
writeHeader
public void writeHeader(OutputStream os) throws IOException
- Specified by:
writeHeaderin classAbstractContent- Throws:
IOException
-
-