java.lang.Object
|
+--javax.microedition.io.Connector
See also: DatagramConnection
for information relating to datagram addressing
- See Also:
- Top Examples, Source Code
public static Connection open(String name)
throws IOException
- See Also:
- ConnectionNotFoundException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[269]Load an image over HTTP on mobile device
By Anonymous on 2003/06/04 06:59:18 Rate
HttpConnection conn = ( HttpConnection ) Connector.open ( someUrl ) ;
try {
int length = ( int ) conn.getLength ( ) ;
byte [ ] bytes = new byte [ length ] ;
DataInputStream dis = new DataInputStream ( conn.openInputStream ( ) ) ;
dis.readFully ( bytes ) ;
return Image.createImage ( bytes, 0, bytes.length ) ;
}
finally {
conn.close ( ) ;
}
public static Connection open(String name,
int mode)
throws IOException
- See Also:
- ConnectionNotFoundException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static Connection open(String name,
int mode,
boolean timeouts)
throws IOException
- See Also:
- ConnectionNotFoundException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
open(javax.microedition.io.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
open(javax.microedition.io.String, int)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
open(javax.microedition.io.String, int, boolean)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static DataInputStream openDataInputStream(String name)
throws IOException
- See Also:
- ConnectionNotFoundException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
openDataInputStream(javax.microedition.io.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static DataOutputStream openDataOutputStream(String name)
throws IOException
- See Also:
- ConnectionNotFoundException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
openDataOutputStream(javax.microedition.io.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static InputStream openInputStream(String name)
throws IOException
- See Also:
- ConnectionNotFoundException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
openInputStream(javax.microedition.io.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static OutputStream openOutputStream(String name)
throws IOException
- See Also:
- ConnectionNotFoundException, IllegalArgumentException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
openOutputStream(javax.microedition.io.String)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int READ
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int READ_WRITE
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int WRITE
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples