/** * Blocks until the desired time as passed to ensure this stream conforms to the requested bits per second. * Once the time has passed the output stream buffer will send its data and be ready for more writes. */ public final boolean hasRoomForChunk() { if (!openForWrite()) { return false; }; waitAsNeededForWrite(); return true; }
private void writePrep() { if (hasOpenWrite) { publishOpenWrite(); } else if (0 == writeStartTime) { writeStartTime = System.currentTimeMillis(); } }
/** * Blocks until the desired time as passed to ensure this stream conforms to the requested bits per second. * Once the time has passed it returns so the InputStream can read the next chunk. */ public final boolean hasNextChunk() { if (!readChunk()) { return false; //No chunk now try again } waitAsNeededForRead(); return true; }
private boolean readChunk() { readPrep(); if (Pipe.hasContentToRead(pipe)) { return beginNewRead(); } return false; }
private boolean openForWrite() { writePrep(); if (Pipe.hasRoomForWrite(pipe)) { return beginNewWrite(); } return false; }
public void shutdown() { shutdown(null); }
private void readPrep() { if (hasOpenRead) { releaseOpenRead(); } else if (0 == readStartTime) { readStartTime = System.currentTimeMillis(); } }
private boolean readChunk() { readPrep(); if (Pipe.hasContentToRead(pipe)) { return beginNewRead(); } return false; }
private boolean openForWrite() { writePrep(); if (Pipe.hasRoomForWrite(pipe)) { return beginNewWrite(); } return false; }
public void shutdown() { shutdown(null); }
private void readPrep() { if (hasOpenRead) { releaseOpenRead(); } else if (0 == readStartTime) { readStartTime = System.currentTimeMillis(); } }
private boolean readChunk() { readPrep(); if (Pipe.hasContentToRead(pipe)) { return beginNewRead(); } return false; }
/** * Blocks until the desired time as passed to ensure this stream conforms to the requested bits per second. * Once the time has passed it returns so the InputStream can read the next chunk. */ public final boolean hasNextChunk() { if (!readChunk()) { return false; //No chunk now try again } waitAsNeededForRead(); return true; }
private boolean openForWrite() { writePrep(); if (Pipe.hasRoomForWrite(pipe)) { return beginNewWrite(); } return false; }
/** * Blocks until the desired time as passed to ensure this stream conforms to the requested bits per second. * Once the time has passed the output stream buffer will send its data and be ready for more writes. */ public final boolean hasRoomForChunk() { if (!openForWrite()) { return false; }; waitAsNeededForWrite(); return true; }
public void shutdown() { shutdown(null); }
private void readPrep() { if (hasOpenRead) { releaseOpenRead(); } else if (0 == readStartTime) { readStartTime = System.currentTimeMillis(); } }
private void writePrep() { if (hasOpenWrite) { publishOpenWrite(); } else if (0 == writeStartTime) { writeStartTime = System.currentTimeMillis(); } }
/** * Blocks until the desired time as passed to ensure this stream conforms to the requested bits per second. * Once the time has passed it returns so the InputStream can read the next chunk. */ public final boolean hasNextChunk() { if (!readChunk()) { return false; //No chunk now try again } waitAsNeededForRead(); return true; }
/** * Blocks until the desired time as passed to ensure this stream conforms to the requested bits per second. * Once the time has passed the output stream buffer will send its data and be ready for more writes. */ public final boolean hasRoomForChunk() { if (!openForWrite()) { return false; }; waitAsNeededForWrite(); return true; }