Lines Matching refs:buffer
50 private static native int native_read(FileDescriptor fd, long address, byte[] buffer,
52 private static native void native_write(FileDescriptor fd, long address, byte[] buffer,
191 * @param buffer byte array to read bytes into.
193 * @param destOffset offset into the byte array buffer to read into.
198 public int readBytes(byte[] buffer, int srcOffset, int destOffset, int count)
203 if (destOffset < 0 || destOffset > buffer.length || count < 0
204 || count > buffer.length - destOffset
209 return native_read(mFD, mAddress, buffer, srcOffset, destOffset, count, mAllowPurging);
216 * @param buffer byte array to write bytes from.
217 * @param srcOffset offset into the byte array buffer to write from.
222 public void writeBytes(byte[] buffer, int srcOffset, int destOffset, int count)
227 if (srcOffset < 0 || srcOffset > buffer.length || count < 0
228 || count > buffer.length - srcOffset
233 native_write(mFD, mAddress, buffer, srcOffset, destOffset, count, mAllowPurging);
303 public int read(byte buffer[], int offset, int count) throws IOException {
304 if (offset < 0 || count < 0 || offset + count > buffer.length) {
313 int result = readBytes(buffer, mOffset, offset, count);
336 public void write(byte buffer[], int offset, int count) throws IOException {
337 writeBytes(buffer, offset, mOffset, count);