com.submersion.jspshop.adminlist
Class NetConnect
java.lang.Object
|
+--com.submersion.jspshop.adminlist.NetConnect
- public class NetConnect
- extends java.lang.Object
Does the underlying networking flow for the ListBrowse Applet
. Basically connects to a URL, reads the data there, and then constructs a HashMap of that data.
- See Also:
AdminList
Field Summary |
(package private) java.util.HashMap |
data
A HashMap containing the data created in the constructor. |
Constructor Summary |
NetConnect(java.lang.String urlString)
Calls the initialise function which connects to the URL, gets the data, and builds the HashMap |
Method Summary |
private void |
buildData(java.io.BufferedInputStream buff)
Reads the BufferedInputStream passed and creates a HashMap based on the data therein. |
java.util.HashMap |
getHashData()
Accessor method to get HashMap of data. |
private void |
initialise(java.lang.String urlString)
Connects to the URL specified and returns a BufferedInputStream that buildData uses to construct the HashMap |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
data
java.util.HashMap data
- A HashMap containing the data created in the constructor.
NetConnect
public NetConnect(java.lang.String urlString)
- Calls the initialise function which connects to the URL, gets the data, and builds the HashMap
- Parameters:
urlString
- The URL to connect to, to get the data required.
getHashData
public java.util.HashMap getHashData()
- Accessor method to get HashMap of data.
- Returns:
- Contains the data created by the Constructor method.
initialise
private void initialise(java.lang.String urlString)
- Connects to the URL specified and returns a BufferedInputStream that buildData uses to construct the HashMap
- Parameters:
urlString
- The URL from which to get Data from
buildData
private void buildData(java.io.BufferedInputStream buff)
throws java.io.IOException
- Reads the BufferedInputStream passed and creates a HashMap based on the data therein.
- Parameters:
buff
- BufferedInputStream passed from initialise method.- Throws:
java.io.IOException
- See the BufferedInputStream IOException