blob: 7f23b062d76b915b9cf835217c23d0f3bc147bf8 (
plain)
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
|
package com.artifex.mupdf.fitz;
public class Buffer
{
static {
Context.init();
}
public static final int DEFAULT_BUFFER_SIZE = 1024;
private long pointer;
protected native void finalize();
public void destroy() {
finalize();
pointer = 0;
}
private native long newNativeBuffer(int n);
public Buffer(int n) {
pointer = newNativeBuffer(n);
}
public Buffer() {
pointer = newNativeBuffer(DEFAULT_BUFFER_SIZE);
}
public native int getLength();
public native void writeByte(byte b);
public native void writeBytes(byte[] bs);
public native void writeBuffer(Buffer buf);
public native void writeRune(int rune);
public native void writeLine(String line);
public native void writeLines(String... lines);
public native void save(String filename);
}
|