Lines Matching defs:length
244 if (mIndexFile.length() !=
246 Log.w(TAG, "invalid index file length");
272 0, mIndexFile.length());
362 if (DATA_HEADER_SIZE + BLOB_HEADER_SIZE + data.length > mMaxBytes) {
366 if (mActiveBytes + BLOB_HEADER_SIZE + data.length > mMaxBytes
378 insertInternal(key, data, data.length);
385 private void insertInternal(long key, byte[] data, int length)
392 writeInt(header, BH_LENGTH, length);
394 mActiveDataFile.write(data, 0, length);
398 mActiveBytes += BLOB_HEADER_SIZE + length;
405 public int length; // output: the length of the blob
422 // The blob is stored in the buffer pointed by req.buffer, and the length
423 // is in stored in the req.length variable.
449 if (mActiveBytes + BLOB_HEADER_SIZE + req.length > mMaxBytes
456 insertInternal(req.key, req.buffer, req.length);
475 // not sync with the data file, or one of them is corrupted). The length
476 // of the blob is stored in the req.length variable.
498 int length = readInt(header, BH_LENGTH);
499 if (length < 0 || length > mMaxBytes - offset - BLOB_HEADER_SIZE) {
500 Log.w(TAG, "invalid blob length: " + length);
503 if (req.buffer == null || req.buffer.length < length) {
504 req.buffer = new byte[length];
508 req.length = length;
510 if (file.read(blob, 0, length) != length) {
514 if (checkSum(blob, 0, length) != sum) {