Class powersoft.jcm.net.Internet
All Packages Class Hierarchy This Package Previous Next Index
Class powersoft.jcm.net.Internet
java.lang.Object
|
+----powersoft.jcm.net.Internet
- public class Internet
- extends Object
Internet class is a base class to all internet components. This class
can also be instanciated.
Notes: Internet class is not drived from
any component. Other classes FTP and HTTP are drived from this class.
-
Internet()
- Instanciate this class.
-
close()
- Close a URL.
-
closeURL()
- Closes a URL.
-
CrackURL(URL)
- Split the specified URL into its components.
-
CreateURL(String, String, int, String, String)
- Creates a String with the supplied parameters that can be
use to create an actual URL.
-
getFile()
- Gets the file name.
-
getInputStream()
- Gets the input stream.
-
getProtocolName()
- Gets the protocol name
-
getRef()
- Gets the reference.
-
getServerName()
- Gets the serve name
-
getServerPort()
- Gets the server port.
-
getURL()
- Gets the URL.
-
getURLConnection()
- Gets the URLConnection.
-
getUserName()
- Gets the user name.
-
getUserPassword()
- Gets the user password.
-
open()
- Opens a URL.
-
openURL()
- Opens a URL.
-
queryDataAvailable()
- Determines the size of the opened resource.
-
readFile(byte[])
- Fills the specified buffer (array of bytes) with the data read
from the input stream.
-
readFile(byte[], InputStream)
- Fills the specified buffer (array of bytes) with the data read
from the specified input stream.
-
setFile(String)
- Sets the file name.
-
setProtocolName(String)
- Sets the protocol name
-
setRef(String)
- Sets the reference.
-
setServerName(String)
- Sets the server name.
-
setServerPort(int)
- Sets the server port.
-
setUserName(String)
- Sets the user name.
-
setUserPassword(String)
- Sets the user password.
Internet
public Internet()
- Instanciate this class.
getProtocolName
public String getProtocolName()
- Gets the protocol name
setProtocolName
public void setProtocolName(String protocol)
- Sets the protocol name
- Parameters:
- protocol - String containing the protocol name
getServerName
public String getServerName()
- Gets the serve name
setServerName
public void setServerName(String host)
- Sets the server name.
- Parameters:
- host - String containing the server name.
getServerPort
public int getServerPort()
- Gets the server port.
setServerPort
public void setServerPort(int port)
- Sets the server port.
- Parameters:
- port - The port number.
getFile
public String getFile()
- Gets the file name.
setFile
public void setFile(String file)
- Sets the file name.
- Parameters:
- file - String containing the file name.
getRef
public String getRef()
- Gets the reference.
setRef
public void setRef(String ref)
- Sets the reference.
- Parameters:
- ref - String containing the reference.
getURL
public URL getURL()
- Gets the URL.
getURLConnection
public URLConnection getURLConnection()
- Gets the URLConnection.
getInputStream
public InputStream getInputStream()
- Gets the input stream.
getUserName
public String getUserName()
- Gets the user name.
setUserName
public void setUserName(String userName)
- Sets the user name.
- Parameters:
- userName - String containing the user name.
getUserPassword
public String getUserPassword()
- Gets the user password.
setUserPassword
public void setUserPassword(String userPassword)
- Sets the user password.
- Parameters:
- userPassword - String containing the user password.
open
public boolean open()
- Opens a URL.
openURL
public boolean openURL()
- Opens a URL.
close
public void close()
- Close a URL.
closeURL
public void closeURL()
- Closes a URL.
queryDataAvailable
public int queryDataAvailable()
- Determines the size of the opened resource.
readFile
public int readFile(byte buffer[])
- Fills the specified buffer (array of bytes) with the data read
from the input stream.
Notes: Internally this routine calls readFile( byte[], InputStream ).
- Parameters:
- buffer - An array of bytes.
- Returns:
- The number of bytes read from the input stream; or -1 if
eof
is encountered.
readFile
public int readFile(byte buffer[],
InputStream inputStream)
- Fills the specified buffer (array of bytes) with the data read
from the specified input stream.
- Parameters:
- buffer - An array of bytes.
- inputStream - An InputStream to read the data from.
- Returns:
- The number of bytes read from the input stream; or -1 if
eof
is encountered.
CrackURL
public static URLComponents CrackURL(URL url)
- Split the specified URL into its components.
- Parameters:
- url - URL instance.
- Returns:
- A URLComponent object containing the components of
url
.
CreateURL
public static String CreateURL(String protocol,
String host,
int port,
String file,
String ref)
- Creates a String with the supplied parameters that can be
use to create an actual URL.
- Parameters:
- protocol - String containing the protocol name.
- host - String containing the host name.
- port - The port number.
- file - String containing the file name.
- ref - String containing the reference.
All Packages Class Hierarchy This Package Previous Next Index