Debian Codegraph @

src/uk/me/parabola/imgfmt/fs/ImgChannel.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2006 Steve Ratcliffe
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 *
14 * Author: Steve Ratcliffe
15 * Create date: 02-Dec-2006
16 */
17 package uk.me.parabola.imgfmt.fs;
18
19 import java.nio.channels.ByteChannel;
20
21 /**
22 * An extension of ByteChannel that allows us to know the position. It may
23 * evolve to have several of the methods of the FileChannel class and plays
24 * a similar role.
25 *
26 * @author Steve Ratcliffe
27 */
28 public interface ImgChannel extends ByteChannel {
29
30 /**
31 * Get the file position. Note that this is a logical position relative
32 * to the beginning of the file (the file within the .img file, not the
33 * beginning of the .img file itself).
34 *
35 * @return The offset in bytes from the beginning of the file.
36 */
37 public long position();
38
39 /**
40 * Set the position within the file.
41 *
42 * @param pos The position to set.
43 */
44 public void position(long pos);
45 }