Home | History | Annotate | Download | only in tech

Lines Matching refs:blockIndex

287      * @param blockIndex index of block to lookup, starting from 0
290 public int blockToSector(int blockIndex) {
291 validateBlock(blockIndex);
293 if (blockIndex < 32 * 4) {
294 return blockIndex / 4;
296 return 32 + (blockIndex - 32 * 4) / 16;
415 * @param blockIndex index of block to read, starting from 0
420 public byte[] readBlock(int blockIndex) throws IOException {
421 validateBlock(blockIndex);
424 byte[] cmd = { 0x30, (byte) blockIndex };
437 * @param blockIndex index of block to write, starting from 0
442 public void writeBlock(int blockIndex, byte[] data) throws IOException {
443 validateBlock(blockIndex);
451 cmd[1] = (byte) blockIndex;
466 * @param blockIndex index of block to increment, starting from 0
471 public void increment(int blockIndex, int value) throws IOException {
472 validateBlock(blockIndex);
479 cmd.put( (byte) blockIndex );
494 * @param blockIndex index of block to decrement, starting from 0
499 public void decrement(int blockIndex, int value) throws IOException {
500 validateBlock(blockIndex);
507 cmd.put( (byte) blockIndex );
522 * @param blockIndex index of block to copy to
526 public void transfer(int blockIndex) throws IOException {
527 validateBlock(blockIndex);
530 byte[] cmd = { (byte) 0xB0, (byte) blockIndex };
544 * @param blockIndex index of block to copy from
548 public void restore(int blockIndex) throws IOException {
549 validateBlock(blockIndex);
552 byte[] cmd = { (byte) 0xC2, (byte) blockIndex };