android_overview.pdf
(
555 KB
)
Pobierz
Android Overview
Android Overview
Dongsu Han
1
Outline
•
Java network programming overview
•
Android Overview
•
Android Emulator Overview
•
Project Overview
•
Getting Started
2
Java Network Programming
•
Java.net.* programming model
–
Blocking model, you wait until work is done, maybe
forever
–
One thread required per connection
–
Socket exposes input and output stream
•
Java.nio.* programming model
–
Introduced in Java 1.4, non-blocking IO
–
New Interface: SocketChannel
(in java.nio.channels)
–
Reading/writing via
Buffer
objects rather than
input/output streams
–
Select() implemented
3
Java.net.* Socket API
•
Part of the java.net package
–
import java.net.*;
•
Provides two classes of sockets for TCP
–
Socket : client side of socket
–
ServerSocket : server side of socket
•
Provides one socket type for UDP
–
DatagramSocket
4
Java.net.Socket
•
Making a connection
Socket s = new Socket(“hostname”, port);
•
The constructor not only creates a socket, but
makes a TCP connection.
•
Socket exposes input and output stream.
s.getOutputStream()
s.getInputStream()
•
Most of the time you'll chain the input/output
stream to some other input/output stream or
reader object to more easily handle the data.
5
Plik z chomika:
marcin3113
Inne pliki z tego folderu:
flashupdate_signed.zip
(6909 KB)
com.jfreu.panoplanetwallpaper.apk
(2499 KB)
fishnoodle.spacescapewallpaper.v1.57.apk
(1734 KB)
Snowfall 1.0a.apk
(2769 KB)
The Daylight Ocean.apk
(4962 KB)
Inne foldery tego chomika:
Pliki dostępne do 01.06.2025
Pliki dostępne do 19.01.2025
2015 lipiec
2016 luty
AKTORZY
Zgłoś jeśli
naruszono regulamin