home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
lotus
/
eSuite.exe
/
eSuiteDPP
/
samples
/
weatherchart
/
GetWDataDirect.java
< prev
next >
Wrap
Text File
|
1998-01-09
|
2KB
|
79 lines
///////////////////////////////////////////////////////////////////////////////////////////
//
// GetWDataDirect.java : read weather-data directly from URL
//
//
// Author: F. Salazar
// Created: June, 1997
//
// Copyright (c)1992-1997 Lotus Development Corp. All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////////////////
/*******************************************************************************
Change History:
$Log: //reebok/xyzL/JavaComp/webpack/samples/weatherchart/GetWDataDirect.java
Rev 1.2.2.1 09 Jan 1998 10:52:08 jdonohue
Change package name to samples.weatherchart
Rev 1.2 03 Oct 1997 11:19:28 fsalazar
Correct for no-proxy read.
Rev 1.1 05 Aug 1997 10:15:42 fsalazar
Use webpack.samples.weatherchart package name.
*******************************************************************************/
package samples.weatherchart;
import java.io.*;
import java.net.*;
public class GetWDataDirect extends GetWData
{
private String m_sURL;
public GetWDataDirect( String sURL )
{
super();
m_sURL = new String( sURL );
}
public void read() throws IOException, MalformedURLException
{
URL url;
URLConnection uconn;
BufferedInputStream bistr;
url = new URL( m_sURL );
uconn = url.openConnection();
uconn.setDoOutput( true );
uconn.setDoInput(true);
uconn.connect();
bistr = new BufferedInputStream( uconn.getInputStream() );
if ( !parseStream( bistr, false ) )
{
System.out.print( "Data-format error in read().\r\n");
}
bistr.close();
}
}
// end of GetWDataDirect.java
//////////////////////////////