Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

HTTPClient
Class HTTPConnection.MSLargeWritesBugStream  view HTTPConnection.MSLargeWritesBugStream download HTTPConnection.MSLargeWritesBugStream.java

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byHTTPClient.HTTPConnection.MSLargeWritesBugStream
Enclosing class:
HTTPConnection

private class HTTPConnection.MSLargeWritesBugStream
extends java.io.FilterOutputStream

M$ has yet another bug in their WinSock: if you try to write too much data at once it'll hang itself. This filter therefore splits big writes up into multiple writes of at most 20K.


Field Summary
private  int CHUNK_SIZE
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
(package private) HTTPConnection.MSLargeWritesBugStream(java.io.OutputStream os)
           
 
Method Summary
 void write(byte[] b, int off, int len)
          This method calls the write(int) method len times for all bytes from the array buf starting at index offset.
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHUNK_SIZE

private final int CHUNK_SIZE
See Also:
Constant Field Values
Constructor Detail

HTTPConnection.MSLargeWritesBugStream

HTTPConnection.MSLargeWritesBugStream(java.io.OutputStream os)
Method Detail

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method calls the write(int) method len times for all bytes from the array buf starting at index offset. Subclasses should overwrite this method to get a more efficient implementation.