1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package goldengate.common.file.passthrough;
22
23 import java.nio.channels.FileChannel;
24 import java.util.List;
25
26 import org.jboss.netty.buffer.ChannelBuffer;
27
28
29
30
31
32
33
34 public interface PassthroughFile {
35
36 public boolean isDirectory();
37 public boolean isFile();
38 public ChannelBuffer read(int sizeblock) throws PassthroughException;
39 public int write(ChannelBuffer buffer) throws PassthroughException;
40 public long length();
41 public boolean canRead();
42 public boolean canWrite();
43 public boolean isInReading();
44 public boolean isInWriting();
45 public boolean exists();
46 public boolean delete() throws PassthroughException;
47 public boolean renameTo(String path) throws PassthroughException;
48 public void position(long position) throws PassthroughException;
49 public void flush() throws PassthroughException;
50
51
52
53
54
55
56
57
58 public long transferTo(FileChannel out) throws PassthroughException;
59 public void close() throws PassthroughException;
60
61
62 public List<String> wildcard(String subPath) throws PassthroughException;
63 public boolean mkdir() throws PassthroughException;
64 public boolean rmdir() throws PassthroughException;
65 public boolean changeDirectory(String path) throws PassthroughException;
66
67
68
69
70
71 public String getModificationTime() throws PassthroughException;
72 public List<String> list() throws PassthroughException;
73 public List<String> listFull(boolean lsFormat) throws PassthroughException;
74 public String fileFull(boolean lsFormat) throws PassthroughException;
75 public long getFreeSpace() throws PassthroughException;
76 public long getCRC() throws PassthroughException;
77 public byte[] getMD5() throws PassthroughException;
78 public byte[] getSHA1() throws PassthroughException;
79
80 }