/** * Issues a non blocking read * @return int * @throws IOException */ public int nbRead() throws IOException { return readSocket(true,false); }
/** * Issues a non blocking read * @return int * @throws IOException */ public int nbRead() throws IOException { return readSocket(true,false); }
protected boolean fill(boolean timeout, boolean block) throws IOException, EOFException { boolean read = false; if (parsingHeader) { if (lastValid == buf.length) { throw new IllegalArgumentException (sm.getString("iib.requestheadertoolarge.error")); } // Do a simple read with a short timeout read = readSocket(timeout,block)>0; } else { lastValid = pos = end; // Do a simple read with a short timeout read = readSocket(timeout, block)>0; } return read; }
protected boolean fill(boolean timeout, boolean block) throws IOException, EOFException { boolean read = false; if (parsingHeader) { if (lastValid > headerBufferSize) { throw new IllegalArgumentException (sm.getString("iib.requestheadertoolarge.error")); } // Do a simple read with a short timeout read = readSocket(timeout,block)>0; } else { lastValid = pos = end; // Do a simple read with a short timeout read = readSocket(timeout, block)>0; } return read; }
protected boolean fill(boolean timeout, boolean block) throws IOException, EOFException { boolean read = false; if (parsingHeader) { if (lastValid > headerBufferSize) { throw new IllegalArgumentException (sm.getString("iib.requestheadertoolarge.error")); } // Do a simple read with a short timeout read = readSocket(timeout,block)>0; } else { lastValid = pos = end; // Do a simple read with a short timeout read = readSocket(timeout, block)>0; } return read; }
protected boolean fill(boolean timeout, boolean block) throws IOException, EOFException { boolean read = false; if (parsingHeader) { if (lastValid == buf.length) { throw new IllegalArgumentException (sm.getString("iib.requestheadertoolarge.error")); } // Do a simple read with a short timeout read = readSocket(timeout,block)>0; } else { lastValid = pos = end; // Do a simple read with a short timeout read = readSocket(timeout, block)>0; } return read; }
/** * Fill the internal buffer using data from the undelying input stream. * * @return false if at end of stream */ protected boolean fill(boolean timeout, boolean block) throws IOException, EOFException { boolean read = false; if (parsingHeader) { if (lastValid == buf.length) { throw new IllegalArgumentException (sm.getString("iib.requestheadertoolarge.error")); } // Do a simple read with a short timeout read = readSocket(timeout,block)>0; } else { lastValid = pos = end; // Do a simple read with a short timeout read = readSocket(timeout, block)>0; } return read; }
if ( readSocket(true, false)==0 ) return false;
if ( readSocket(true, false)==0 ) return false;
if ( readSocket(true, false)==0 ) return false;