Index
Pod redakcjš Charlesa E. Skinnera Psychologia wychowawcza (13)
Kurcz Ida Pamięć, uczenie się, język (13)
George Orwell Folwark zwierzęcy (13)
rok 2026 10 13
16 (112)
www nie com pl 3
rozdzial 06 (20)
www nie com pl 1
abc.com.pl 7
207 07 (4)
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • alter.htw.pl

  • [ Pobierz całość w formacie PDF ]
    .While you are developinga service, you may want to run the server on a higher numberedport.Once the service has been developed and debugged, you canmove it to the normal port.The SocketException exceptionis also thrown if you try to use the setSocketImplFactory()method of the Socket or ServerSocketclass when the SocketImplFactoryalready has been set.Usually, the Java interpreter sets thisto a reasonable value for you, but if you are writing your ownsocket factory (for example, to provide sockets through a firewall),this exception may be thrown.The ProtocolExceptionThe ProtocolException exceptionis raised by the underlying network support library.It is thrownby a native method of the PlainSocketImplclass when the underlying socket facilities return a protocolerror.The MalformedURLExceptionThe URL class throws theMalformedURLException exceptionif it is given a syntactically invalid URL.One cause can be thatthe URL specifies a protocol that the URLclass does not support.Another cause is that the URL cannot beparsed.A URL for the HTTP or FILE protocols should have the followinggeneral form:protocol://hostname[:port]/[/path/_/path]/objectIn this syntax, the following components are used:ComponentDescriptionprotocolThe protocol to use to connect to the resource (http or file).hostname[:port]The host name to contact, optionally followed by a colon (:) and the port number to connect to (for example, kremvax.gov.su:8000).The host name also may be given as an IP address.[/path/./path]The (optional) path to the object, separated by / characters.objectThe name of the actual object itself.This syntax for a URL depends on the protocol.The complete URLspecification can be found in RFC 1738 (see Chapter 23,"Introduction to Network Programming," for details onretrieving RFC documents, or check out the World Wide Web Consortium'ssite at http://www.w3.org/for the latest version).Other ExceptionsIn addition to the exceptions in the java.netpackage, several methods throw exceptions from the java.iopackage.The most common of these is java.io.IOException-whichis thrown when there is a problem reading a Web resource by theURL class or if there isa problem creating a Socketobject.InterfacesThe java.net package definesthree interfaces.These interfaces are used primarily behind thescenes by the other networking classes rather than by user classes.Unless you are porting Java to a new platform or are extendingit to use a new socket protocol, you probably will have no needto implement these interfaces in a class.They are included herefor completeness and for those people who like to take off thecover and poke around in the innards to find out how things work.The SocketImplFactoryInterfaceThe SocketImplFactory interfacedefines a method that returns a SocketImplinstance appropriate to the underlying operating system.The socketclasses use an object implementing this interface to create theSocketImpl objects they needto use the network.The URLStreamHandlerFactoryInterfaceClasses that implement the URLStreamHandlerFactoryinterface provide a mapping from protocols such as HTTP or FTPinto the corresponding URLStreamHandlersubclasses.The URL classuses this factory object to obtain a protocol handler.The ContentHandlerFactoryInterfaceThe URLStreamHandler classuses the ContentHandlerFactoryinterface to obtain ContentHandlerobjects for different content types.The interface has one method,createContentHandler(), whichtakes the MIME type for which a handler is desired as a String.SummaryThis chapter provided a quick introduction to the networking facilitiesthat the java.net packageprovides.Appendix C, "The Java Class Library," containsmore detailed information about the specific arguments and returntypes for the various methods.Contactreference@developer.com with questions or comments.Copyright 1998EarthWeb Inc., All rights reserved.PLEASE READ THE.Copyright 1998 Macmillan Computer Publishing.All rights reserved [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • aceton.keep.pl
  • 
    Wszelkie Prawa Zastrzeżone! Kawa była słaba i bez smaku. Nie miała treści, a jedynie formę. Design by SZABLONY.maniak.pl.