com.partnersoft.io.net
Class NetworkLib

java.lang.Object
  extended by com.partnersoft.io.net.NetworkLib

public class NetworkLib
extends java.lang.Object

Generic handy network methods.

Author:
Paul Reavis Copyright 2000 Partner Software, Inc.

Constructor Summary
NetworkLib()
           
 
Method Summary
static java.lang.String addressPart(java.lang.String portedAddress)
           
static java.io.InputStream attachStandardInputFilters(java.io.InputStream victim)
          Use this to attach standard network input filters, based on NetworkConfig (e.g.
static java.io.OutputStream attachStandardOutputFilters(java.io.OutputStream victim)
          Use this to attach standard network output filters, based on NetworkConfig (e.g.
static java.io.InputStream attachUncompressedInputFilters(java.io.InputStream victim)
          Use this to attach standard network input filters, based on NetworkConfig, except for compression (which often behaves strangely for interactive sessions).
static java.io.OutputStream attachUncompressedOutputFilters(java.io.OutputStream victim)
          Use this to attach standard network output filters, based on NetworkConfig, except for compression (which often behaves strangely for interactive sessions).
static int portPart(java.lang.String portedAddress)
           
static void reportBytesTransferred(java.lang.String type, long count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkLib

public NetworkLib()
Method Detail

reportBytesTransferred

public static void reportBytesTransferred(java.lang.String type,
                                          long count)

attachStandardInputFilters

public static java.io.InputStream attachStandardInputFilters(java.io.InputStream victim)
                                                      throws java.io.IOException
Use this to attach standard network input filters, based on NetworkConfig (e.g. verbose byte counters and compression). Feed it your InputStream and use the result.

Throws:
java.io.IOException

attachStandardOutputFilters

public static java.io.OutputStream attachStandardOutputFilters(java.io.OutputStream victim)
                                                        throws java.io.IOException
Use this to attach standard network output filters, based on NetworkConfig (e.g. verbose byte counters and compression). Feed it your OutputStream and use the result.

Throws:
java.io.IOException

attachUncompressedInputFilters

public static java.io.InputStream attachUncompressedInputFilters(java.io.InputStream victim)
                                                          throws java.io.IOException
Use this to attach standard network input filters, based on NetworkConfig, except for compression (which often behaves strangely for interactive sessions).

Throws:
java.io.IOException

attachUncompressedOutputFilters

public static java.io.OutputStream attachUncompressedOutputFilters(java.io.OutputStream victim)
                                                            throws java.io.IOException
Use this to attach standard network output filters, based on NetworkConfig, except for compression (which often behaves strangely for interactive sessions).

Throws:
java.io.IOException

addressPart

public static java.lang.String addressPart(java.lang.String portedAddress)

portPart

public static int portPart(java.lang.String portedAddress)