javax.microedition.io
Interface ContentConnection

All Known Subinterfaces:
HttpConnection

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.
 String getHeaderField(String name)
           
 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.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.

getHeaderField

public String getHeaderField(String name)

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.