java/src/main/java/com/genexus/PrivateUtilities.java
/**
     	A fixed version of java.io.InputStream.read(byte[], int, int).  The
     	standard version catches and ignores IOExceptions from below.
     	This version sends them on to the caller.
	*/
A fixed version of java.io.InputStream.read(byte[], int, int).  The
standard version catches and ignores IOExceptions from below.
This version sends them on to the caller.
A fixed version of java . io . InputStream . read ( byte [] int int ) . The standard version catches and ignores IOExceptions from below . This version sends them on to the caller .
public static int read( InputStream in, byte[] b, int off, int len ) throws IOException
        {
        if ( len <= 0 )
            return 0;
        int c = in.read();
        if ( c == -1 )
            return -1;
        if ( b != null )
            b[off] = (byte) c;
        int i;
        for ( i = 1; i < len ; ++i )
            {
            c = in.read();
            if ( c == -1 )
                break;
            if ( b != null )
                b[off + i] = (byte) c;
            }
        return i;
        }
public static int read ( InputStream in , byte [ ] b , int off , int len ) throws IOException { if ( len <= 0 ) return 0 ; int c = in . read ( ) ; if ( c == - 1 ) return - 1 ; if ( b != null ) b [ off ] = ( byte ) c ; int i ; for ( i = 1 ; i < len ; ++ i ) { c = in . read ( ) ; if ( c == - 1 ) break ; if ( b != null ) b [ off + i ] = ( byte ) c ; } return i ; }
A fixed version of java.io.InputStream.read(byte[], int, int).
A fixed version of java . io . InputStream . read ( byte [] int int ) .