Created
September 9, 2009 14:58
-
-
Save mmattozzi/183777 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GET | |
@Produces({"application/atom+xml"}) | |
public Response getChannelPermission (@PathParam(ACCOUNT_ELEMENT) String accountId) { | |
final Feed feed = generateChannelAtomFeed(accountId); | |
StreamingOutput s = new StreamingOutput() { | |
@Override | |
public void write(OutputStream output) throws IOException, | |
WebApplicationException { | |
XmlWriter writer = new XmlWriter(new OutputStreamWriter(output)); | |
feed.generateAtom(writer, new ExtensionProfile()); | |
} | |
}; | |
Response.ResponseBuilder builder = Response.ok(s); | |
builder.header("ETag", "fjahsjghakjhgkajhdgjkhag"); | |
Response r = builder.build(); | |
return r; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment