-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy pathPSTFileContentTest.java
More file actions
54 lines (41 loc) · 1.15 KB
/
PSTFileContentTest.java
File metadata and controls
54 lines (41 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package com.pff;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import java.io.IOException;
@RunWith(JUnit4.class)
public class PSTFileContentTest {
static class TestPSTFileContent extends PSTFileContent {
int position = 0;
@Override
public void seek(long index) throws IOException {
position = (int) index;
}
@Override
public long getFilePointer() throws IOException {
return position;
}
@Override
public int read() throws IOException {
return 0;
}
@Override
public int read(byte[] target) throws IOException {
int read = 3;
position += read;
return read;
}
@Override
public byte readByte() throws IOException {
return 0;
}
@Override
public void close() throws IOException {
}
}
@Test
public void testReadCompletely() throws IOException {
PSTFileContent pstFileContent = new TestPSTFileContent();
pstFileContent.readCompletely(new byte[10]);
}
}