Back to project page task4java.
The source code is released under:
Apache License
If you think the Android project task4java listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright (c) 2014 Andree Hagelstein, Maik Schulze, Deutsche Telekom AG. All Rights Reserved. * //from w w w . j av a2 s.com * Filename: HttpContent.java */ package com.task4java.http.client; import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; public class HttpStringContent extends HttpContent { protected final byte[] content; public HttpStringContent(final String content, final String charsetName) throws UnsupportedEncodingException { super(); this.content = content.getBytes(charsetName); } @Override public void writeTo(OutputStream stream) throws IOException { stream.write(this.content); stream.flush(); } }