SocketException: Socket is closed
<p>Now bear with me because this is an odd situation. My project is written and compiled using JDK1.4 and it uses Apache's HTTPClient (the depreciated one) to handle HTTP/HTTPS connections. For our next release we will be upgrading to IBM Websphere 7 and with that our web service application will be running on JRE6. While doing some testing I ran into an issue while loading '<a href="https://myaccounts.navyfcu.org/cgi-bin/ifsewwwc" rel="nofollow">https://myaccounts.navyfcu.org/cgi-bin/ifsewwwc</a>'. While iterating through the GZInputStream a SocketException occurs. I have checked that we are in fact using HTTP Protocol 1.1 and the Request and Response headers match what I see in HTTPFox. This is not an issues when setting the runtime environment to JRE4, and this is the only URL in our list that is having this issue. Any help would be appreciated.</p>

<p><em>EDIT</em> Added code for reference. </p>

<pre><code>protected void load( java.io.InputStream input ) throws java.io.IOException, com.paytrust.Bot.ProcessCancelledException
{
    if( null == input )
        throw new NullPointerException( "Non-null input stream expected" );

    // Clear data
    m_content = null; // String that holds the HTML
    m_lowerCaseContent = null; // Tracks m_content
    resetIndex(); 

    // Load
    final int XFER_BLOCK_SIZE = 4096;
    char[] xferBuff = new char[XFER_BLOCK_SIZE];
    InputStreamReader inputStreamReader = null;
    BufferedReader bufferedReader = null;
    try
    {        
        inputStreamReader = new InputStreamReader( input );   // Translate to Unicode characters
        bufferedReader = new BufferedReader( inputStreamReader, XFER_BLOCK_SIZE );      // Buffer the stream 

        int numCharsRead = 0;
        StringBuffer stringBuff = new StringBuffer( 2 * XFER_BLOCK_SIZE );   
        while( ( numCharsRead = bufferedReader.read( xferBuff, 0, XFER_BLOCK_SIZE ) ) != -1 )
            stringBuff.append( xferBuff, 0, numCharsRead ); 
        if( 0 != stringBuff.length() )
            m_content = stringBuff.toString();  
    }
    finally
    {
        // Free resources
        if( bufferedReader != null )
            bufferedReader.close();
        if( inputStreamReader != null )
            inputStreamReader.close(); 
    }    
}
</code></pre>
