-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathWrapperBuf.java
More file actions
99 lines (78 loc) · 2.52 KB
/
WrapperBuf.java
File metadata and controls
99 lines (78 loc) · 2.52 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package uk.ac.bristol.star.cdf.record;
import java.io.IOException;
import java.io.InputStream;
/**
* Buf implementation based on an existing Buf instance.
* All methods are delegated to the base buf.
*
* @author Mark Taylor
* @since 18 Jun 2013
*/
public class WrapperBuf implements Buf {
private final Buf base_;
/**
* Constructor.
*
* @param base base buf
*/
public WrapperBuf( Buf base ) {
base_ = base;
}
public long getLength() {
return base_.getLength();
}
public int readUnsignedByte( Pointer ptr ) throws IOException {
return base_.readUnsignedByte( ptr );
}
public int readInt( Pointer ptr ) throws IOException {
return base_.readInt( ptr );
}
public long readOffset( Pointer ptr ) throws IOException {
return base_.readOffset( ptr );
}
public String readAsciiString( Pointer ptr, int nbyte ) throws IOException {
return base_.readAsciiString( ptr, nbyte );
}
public void setBit64( boolean bit64 ) {
base_.setBit64( bit64 );
}
public boolean isBit64() {
return base_.isBit64();
}
public void setEncoding( boolean isBigendian ) {
base_.setEncoding( isBigendian );
}
public boolean isBigendian() {
return base_.isBigendian();
}
public void readDataBytes( long offset, int count, byte[] array )
throws IOException {
base_.readDataBytes( offset, count, array );
}
public void readDataShorts( long offset, int count, short[] array )
throws IOException {
base_.readDataShorts( offset, count, array );
}
public void readDataInts( long offset, int count, int[] array )
throws IOException {
base_.readDataInts( offset, count, array );
}
public void readDataLongs( long offset, int count, long[] array )
throws IOException {
base_.readDataLongs( offset, count, array );
}
public void readDataFloats( long offset, int count, float[] array )
throws IOException {
base_.readDataFloats( offset, count, array );
}
public void readDataDoubles( long offset, int count, double[] array )
throws IOException {
base_.readDataDoubles( offset, count, array );
}
public InputStream createInputStream( long offset ) {
return base_.createInputStream( offset );
}
public Buf fillNewBuf( long count, InputStream in ) throws IOException {
return base_.fillNewBuf( count, in );
}
}