javax.microedition.io
Interface ContentConnection

All Superinterfaces:
Connection, InputConnection, OutputConnection, StreamConnection
All Known Subinterfaces:
HttpConnection, HttpsConnection

public interface ContentConnection
extends StreamConnection

This interface defines the stream connection over which MIME encoded content is passed.


Method Summary
 String getEncoding()
          Returns the value of the content-encoding header field.
 long getLength()
          Returns the value of the content-length header field.
 String getType()
          Returns the value of the content-type header field.
 
Methods inherited from interface javax.microedition.io.InputConnection
openDataInputStream, openInputStream
 
Methods inherited from interface javax.microedition.io.Connection
close
 
Methods inherited from interface javax.microedition.io.OutputConnection
openDataOutputStream, openOutputStream
 

Method Detail

getType

public String getType()
Returns the value of the content-type header field.

Returns:
the content type of the resource that the URL references, or null if not known.

getEncoding

public String getEncoding()
Returns the value of the content-encoding header field.

Returns:
the content encoding of the resource that the URL references, or null if not known.

getLength

public long getLength()
Returns the value of the content-length header field.

Returns:
the content length of the resource that this connection's URL references, or -1 if the content length is not known.