hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Httpcomponents Wiki] Update of "HttpCoreTutorial" by OlegKalnichevski
Date Sun, 14 Dec 2008 14:06:28 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpcomponents Wiki" for change notification.

The following page has been changed by OlegKalnichevski:
http://wiki.apache.org/HttpComponents/HttpCoreTutorial

------------------------------------------------------------------------------
  [[Anchor(BasicHttpEntity)]]
  === BasicHttpEntity ===
  
- This is exactly as the name implies, a basic entity that represents an underlying stream.
This is generally used for the entities received from HTTP responses.
+ This is exactly as the name implies, a basic entity that represents an underlying stream.
This is generally used for the entities received from HTTP messages.
  
  This entity has an empty constructor. After construction it represents no content, and has
a negative content length.
  
@@ -241, +241 @@

  [[Anchor(ByteArrayEntity)]]
  === ByteArrayEntity ===
  
- This is a simple self contained repeatable entity, which receives its content from a given
byte array. This byte array is supplied to the constructor.
+ !ByteArrayEntity is a self contained, repeatable entity that obtains its content from a
given byte array. This byte array is supplied to the constructor.
  
  {{{
  String myData = "Hello world on the other side!!";
@@ -251, +251 @@

  [[Anchor(StringEntity)]]
  === StringEntity ===
  
- Very simple entity. It's is a self contained, repeatable entity that retrieves its data
from a String object.
+ !StringEntity is a self contained, repeatable entity that obtains its content from a String
object.
  
  It has 2 constructors, one simply constructs with a given String object; the other also
takes a character encoding for the data in the String.
  
@@ -298, +298 @@

  [[Anchor(FileEntity)]]
  === FileEntity ===
  
- This entity reads its content body from a file. Since this is mostly used to stream large
files of different types, one needs to supply the content type of the file, for instance,
sending a zip file would require the content type "application/zip", for XML "application/xml".
+ !FileEntity is a self contained, repeatable entity that obtains its content from a file.
Since this is mostly used to stream large files of different types, one needs to supply the
content type of the file, for instance, sending a zip file would require the content type
"application/zip", for XML "application/xml".
  
  {{{File staticFile = new File("/path/to/myapp.jar");
  HttpEntity entity = new FileEntity(staticFile, "application/java-archive");
@@ -307, +307 @@

  [[Anchor(InputStreamEntity)]]
  === InputStreamEntity ===
  
- An entity that reads its content from an input stream. It is constructed by supplying the
input stream and the content length.
+ !InputStreamEntity is a streamed, non-repeatable entity that obtains its content from an
input stream. It is constructed by supplying the input stream and the content length.
  
  The content length is used to limit the amount of data read from the !InputStream. If the
length matches the content length available on the input stream, then all data will be sent.
Alternatively a negative content length will read all data from the input stream, which is
the same as supplying the exact content length, so the length is most often used to limit
the length.
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message