Code example for MappedByteBuffer

Methods: force

0
		} 
	} 
 
	public void syncIndex() { 
		try { 
			mIndexBuffer.force();
		} catch (final Throwable t) {
			Log.w(TAG, "sync index failed", t);
		} 
	} 
 
	// Clear the hash table starting from the specified offset. 
	private void clearHash(final int hashStart) {
		final byte[] zero = new byte[1024];
		mIndexBuffer.position(hashStart);
		for (int count = mMaxEntries * 12; count > 0;) {
			final int todo = Math.min(count, 1024);
			mIndexBuffer.put(zero, 0, todo);
			count -= todo;
		} 
	}