Lines Matching full:chunk
71 // Read the chunk from the file.
78 RandomAccessFile chunkFile = getChunkFile(record.chunk);
86 Log.e(TAG, "Unable to read from chunk file");
115 // We just replace the chunk.
116 int currentChunk = record.chunk;
118 RandomAccessFile chunkFile = getChunkFile(record.chunk);
136 Log.e(TAG, "Unable to read from chunk file");
139 // Append a new chunk to the current chunk.
140 final int chunk = mTailChunk;
141 final RandomAccessFile chunkFile = getChunkFile(chunk);
148 mIndexMap.put(key, new Record(chunk, offset, data.length, data.length, timestamp));
163 Log.e(TAG, "Unable to write new entry to chunk file");
208 Log.e(TAG, "Unable to close chunk file");
259 final int chunk = dataInput.readShort();
264 mIndexMap.append(key, new Record(chunk, offset, size, sizeOnDisk, timestamp));
312 dataOutput.writeShort(record.chunk);
333 private RandomAccessFile getChunkFile(int chunk) {
336 chunkFile = mChunkFiles.get(chunk);
339 final String chunkFilePath = mCacheDirectoryPath + CHUNK_FILE_PREFIX + chunk;
343 Log.e(TAG, "Unable to create or open the chunk file " + chunkFilePath);
346 mChunkFiles.put(chunk, chunkFile);
353 public Record(int chunk, int offset, int size, int sizeOnDisk, long timestamp) {
354 this.chunk = chunk;
362 public final int chunk;