home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cricao de Sites - 650 Layouts Prontos
/
WebMasters.iso
/
Servidores
/
bb98.exe
/
SOinit.java
< prev
next >
Wrap
Text File
|
2002-11-09
|
2KB
|
73 lines
//
// The contents of this file are subject to the BadBlue End User License
// Agreement (the "EULA"); you may not use this file except in
// compliance with the EULA. You may obtain a copy of the EULA at
// http://badblue.com/down.htm .
//
// Software distributed under the EULA is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the EULA
// for the specific language governing rights and limitations under the
// EULA.
//
// The Initial Developer of this code under the EULA is Working Resources,
// Inc., Atlanta, GA UNITED STATES. All Rights Reserved.
//
//
package ShareOffice;
//
import java.net.*;
import java.io.*;
import ShareOffice.HTTPGet;
//
public class SOinit {
//
public SOinit() {
}
//
// Initialize the connection (just needed before calling any other
// of these functions like retrieving Excel data)
// Inputs:
// sAddr: address of BadBlue server (e.g., "127.0.0.1:8080")
// Outputs:
// errmsg: empty if no error occurred, otherwise error message
//
public String Initialize(
String sAddr
) {
String sError = "";
try {
// Construct the URL and read it.
//
String sURL =
"http://"+sAddr+"/ext.dll?MfcISAPICommand=LoadPage&"+
"page=search.htx&a0=xyzzy&a1=0&a2=1&a3=6";
HTTPGet h = new HTTPGet();
String sPage = h.Read(sURL);
// System.out.println(sPage);
return (sError);
// ...end SP.
//
} catch (StringIndexOutOfBoundsException e) {
sError = "Error: string out of bounds: " + e.getMessage();
return (sError);
// ...end SP.
//
} catch (Exception e) {
sError = "Error: no data available: " + e.getMessage();
return (sError);
}
}
// Private members.
//
}
// <EOF>
//