void offerData ( byte [ ] chunk ) { if ( chunk == null || chunk . length == 0 ) { throw new IllegalArgumentException ( "chunk must have at least one byte of data" ) ; } if ( closed ) { return ; } // Since this is an unbounded queue, offer() always succeeds. In addition, we don't make a copy // of the chunk, as the data source (NSURLSessionDataTask) does not reuse the underlying byte // array of a chunk when the chunk is alive. queue . offer ( chunk ) ; }
Offers a chunk of data to the queue .