Java Doc for SocketImpl.java in  » 6.0-JDK-Modules » j2me » java » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.net.SocketImpl

All known Subclasses:   java.net.PlainSocketImpl,
SocketImpl
abstract public class SocketImpl implements SocketOptions(Code)
The abstract class SocketImpl is a common superclass of all classes that actually implement sockets. It is used to create both client and server sockets.

A "plain" socket implements these methods exactly as described, without attempting to go through a firewall or proxy.
author:
   unascribed
version:
   1.31 10/17/00
since:
   JDK1.0



Field Summary
protected  InetAddressaddress
     The IP address of the remote end of this socket.
protected  FileDescriptorfd
     The file descriptor object for this socket.
protected  intlocalport
     The local port number to which this socket is connected.
protected  intport
     The port number on the remote host to which this socket is connected.
 ServerSocketserverSocket
    
 Socketsocket
     The actual Socket object.


Method Summary
abstract protected  voidaccept(SocketImpl s)
     Accepts a connection.
abstract protected  intavailable()
     Returns the number of bytes that can be read from this socket without blocking.
abstract protected  voidbind(InetAddress host, int port)
     Binds this socket to the specified port number on the specified host.
abstract protected  voidclose()
     Closes this socket.
abstract protected  voidconnect(String host, int port)
     Connects this socket to the specified port on the named host.
abstract protected  voidconnect(InetAddress address, int port)
     Connects this socket to the specified port number on the specified host.
abstract protected  voidconnect(SocketAddress address, int timeout)
     Connects this socket to the specified port number on the specified host. A timeout of zero is interpreted as an infinite timeout.
abstract protected  voidcreate(boolean stream)
     Creates either a stream or a datagram socket.
protected  FileDescriptorgetFileDescriptor()
     Returns the value of this socket's fd field.
protected  InetAddressgetInetAddress()
     Returns the value of this socket's address field.
abstract protected  InputStreamgetInputStream()
     Returns an input stream for this socket.
protected  intgetLocalPort()
     Returns the value of this socket's localport field.
abstract protected  OutputStreamgetOutputStream()
     Returns an output stream for this socket.
protected  intgetPort()
     Returns the value of this socket's port field.
 ServerSocketgetServerSocket()
    
 SocketgetSocket()
    
abstract protected  voidlisten(int backlog)
     Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument.
 voidreset()
    
abstract protected  voidsendUrgentData(int data)
     Send one byte of urgent data on the socket.
 voidsetServerSocket(ServerSocket soc)
    
 voidsetSocket(Socket soc)
    
protected  voidshutdownInput()
     Places the input stream for this socket at "end of stream".
protected  voidshutdownOutput()
     Disables the output stream for this socket.
protected  booleansupportsUrgentData()
     Returns whether or not this SocketImpl supports sending urgent data.
public  StringtoString()
     Returns the address and port of this socket as a String.

Field Detail
address
protected InetAddress address(Code)
The IP address of the remote end of this socket.



fd
protected FileDescriptor fd(Code)
The file descriptor object for this socket.



localport
protected int localport(Code)
The local port number to which this socket is connected.



port
protected int port(Code)
The port number on the remote host to which this socket is connected.



serverSocket
ServerSocket serverSocket(Code)



socket
Socket socket(Code)
The actual Socket object.





Method Detail
accept
abstract protected void accept(SocketImpl s) throws IOException(Code)
Accepts a connection.
Parameters:
  s - the accepted connection.
exception:
  IOException - if an I/O error occurs when accepting theconnection.



available
abstract protected int available() throws IOException(Code)
Returns the number of bytes that can be read from this socket without blocking. the number of bytes that can be read from this socketwithout blocking.
exception:
  IOException - if an I/O error occurs when determining thenumber of bytes available.



bind
abstract protected void bind(InetAddress host, int port) throws IOException(Code)
Binds this socket to the specified port number on the specified host.
Parameters:
  host - the IP address of the remote host.
Parameters:
  port - the port number.
exception:
  IOException - if an I/O error occurs when binding this socket.



close
abstract protected void close() throws IOException(Code)
Closes this socket.
exception:
  IOException - if an I/O error occurs when closing this socket.



connect
abstract protected void connect(String host, int port) throws IOException(Code)
Connects this socket to the specified port on the named host.
Parameters:
  host - the name of the remote host.
Parameters:
  port - the port number.
exception:
  IOException - if an I/O error occurs when connecting to theremote host.



connect
abstract protected void connect(InetAddress address, int port) throws IOException(Code)
Connects this socket to the specified port number on the specified host.
Parameters:
  address - the IP address of the remote host.
Parameters:
  port - the port number.
exception:
  IOException - if an I/O error occurs when attempting aconnection.



connect
abstract protected void connect(SocketAddress address, int timeout) throws IOException(Code)
Connects this socket to the specified port number on the specified host. A timeout of zero is interpreted as an infinite timeout. The connection will then block until established or an error occurs.
Parameters:
  address - the Socket address of the remote host.
Parameters:
  timeout - the timeout value, in milliseconds, or zero for no timeout.
exception:
  IOException - if an I/O error occurs when attempting aconnection.
since:
   1.4



create
abstract protected void create(boolean stream) throws IOException(Code)
Creates either a stream or a datagram socket.
Parameters:
  stream - if true, create a stream socket;otherwise, create a datagram socket.
exception:
  IOException - if an I/O error occurs while creating thesocket.



getFileDescriptor
protected FileDescriptor getFileDescriptor()(Code)
Returns the value of this socket's fd field. the value of this socket's fd field.
See Also:   java.net.SocketImpl.fd



getInetAddress
protected InetAddress getInetAddress()(Code)
Returns the value of this socket's address field. the value of this socket's address field.
See Also:   java.net.SocketImpl.address



getInputStream
abstract protected InputStream getInputStream() throws IOException(Code)
Returns an input stream for this socket. a stream for reading from this socket.
exception:
  IOException - if an I/O error occurs when creating theinput stream.



getLocalPort
protected int getLocalPort()(Code)
Returns the value of this socket's localport field. the value of this socket's localport field.
See Also:   java.net.SocketImpl.localport



getOutputStream
abstract protected OutputStream getOutputStream() throws IOException(Code)
Returns an output stream for this socket. an output stream for writing to this socket.
exception:
  IOException - if an I/O error occurs when creating theoutput stream.



getPort
protected int getPort()(Code)
Returns the value of this socket's port field. the value of this socket's port field.
See Also:   java.net.SocketImpl.port



getServerSocket
ServerSocket getServerSocket()(Code)



getSocket
Socket getSocket()(Code)



listen
abstract protected void listen(int backlog) throws IOException(Code)
Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument. If a connection indication arrives when the queue is full, the connection is refused.
Parameters:
  backlog - the maximum length of the queue.
exception:
  IOException - if an I/O error occurs when creating the queue.



reset
void reset() throws IOException(Code)



sendUrgentData
abstract protected void sendUrgentData(int data) throws IOException(Code)
Send one byte of urgent data on the socket. The byte to be sent is the low eight bits of the parameter
Parameters:
  data - The byte of data to send
exception:
  IOException - if there is an errorsending the data.
since:
   1.4



setServerSocket
void setServerSocket(ServerSocket soc)(Code)



setSocket
void setSocket(Socket soc)(Code)



shutdownInput
protected void shutdownInput() throws IOException(Code)
Places the input stream for this socket at "end of stream". Any data sent to this socket is acknowledged and then silently discarded. If you read from a socket input stream after invoking shutdownInput() on the socket, the stream will return EOF.
exception:
  IOException - if an I/O error occurs when shutting down thissocket.
See Also:   java.net.Socket.shutdownOutput
See Also:   java.net.Socket.close
See Also:   java.net.Socket.setSoLinger(booleanint)



shutdownOutput
protected void shutdownOutput() throws IOException(Code)
Disables the output stream for this socket. For a TCP socket, any previously written data will be sent followed by TCP's normal connection termination sequence. If you write to a socket output stream after invoking shutdownOutput() on the socket, the stream will throw an IOException.
exception:
  IOException - if an I/O error occurs when shutting down thissocket.
See Also:   java.net.Socket.shutdownInput
See Also:   java.net.Socket.close
See Also:   java.net.Socket.setSoLinger(booleanint)



supportsUrgentData
protected boolean supportsUrgentData()(Code)
Returns whether or not this SocketImpl supports sending urgent data. By default, false is returned unless the method is overridden in a sub-class true if urgent data supported
See Also:   java.net.SocketImpl.address
since:
   1.4



toString
public String toString()(Code)
Returns the address and port of this socket as a String. a string representation of this socket.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.