/** * Available bytes (note that due to encoding, this may not correspond ) */ public int available() { int result = (lastValid - pos); if ((result == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (result == 0) && (i <= lastActiveFilter); i++) { result = activeFilters[i].available(); } } return result; }
/** * Available bytes (note that due to encoding, this may not correspond ) */ public int available() { int result = (lastValid - pos); if ((result == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (result == 0) && (i <= lastActiveFilter); i++) { result = activeFilters[i].available(); } } return result; }
/** * Available bytes in the buffers (note that due to encoding, this may not * correspond). */ public int available() { int result = (lastValid - pos); if ((result == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (result == 0) && (i <= lastActiveFilter); i++) { result = activeFilters[i].available(); } } return result; }
/** * Available bytes (note that due to encoding, this may not correspond ) */ public int available() { int result = (lastValid - pos); if ((result == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (result == 0) && (i <= lastActiveFilter); i++) { result = activeFilters[i].available(); } } return result; }
/** * Available bytes (note that due to encoding, this may not correspond ) */ public int available() { int result = (lastValid - pos); if ((result == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (result == 0) && (i <= lastActiveFilter); i++) { result = activeFilters[i].available(); } } return result; }
/** * Available bytes (note that due to encoding, this may not correspond ) */ public int available() { int result = (lastValid - pos); if ((result == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (result == 0) && (i <= lastActiveFilter); i++) { result = activeFilters[i].available(); } } return result; }
/** * Available bytes (note that due to encoding, this may not correspond ) */ public int available() { int result = (lastValid - pos); if ((result == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (result == 0) && (i <= lastActiveFilter); i++) { result = activeFilters[i].available(); } } return result; }
/** * Available bytes in the buffers (note that due to encoding, this may not * correspond). */ int available(boolean read) { int available = byteBuffer.remaining(); if ((available == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (available == 0) && (i <= lastActiveFilter); i++) { available = activeFilters[i].available(); } } if (available > 0 || !read) { return available; } try { fill(false); available = byteBuffer.remaining(); } catch (IOException ioe) { if (log.isDebugEnabled()) { log.debug(sm.getString("iib.available.readFail"), ioe); } // Not ideal. This will indicate that data is available which should // trigger a read which in turn will trigger another IOException and // that one can be thrown. available = 1; } return available; }
/** * Available bytes in the buffers (note that due to encoding, this may not * correspond). */ public int available() { int available = lastValid - pos; if ((available == 0) && (lastActiveFilter >= 0)) { for (int i = 0; (available == 0) && (i <= lastActiveFilter); i++) { available = activeFilters[i].available(); } } if (available > 0) { return available; } try { fill(false); available = lastValid - pos; } catch (IOException ioe) { if (getLog().isDebugEnabled()) { getLog().debug(sm.getString("iib.available.readFail"), ioe); } // Not ideal. This will indicate that data is available which should // trigger a read which in turn will trigger another IOException and // that one can be thrown. available = 1; } return available; }