70
71 // State for progress bar:
72 private long _byteCount; // bytes read in current segment
73 private int _segCount; // number of segs scanned
74 private int _fileCount; // number of files written
75 private long _estByteLimit; // estimate of eventual total
76 private int _estSegLimit; // ditto
77 private int _estFileLimit; // ditto
78 private int _prevPercent = -1; // for monotonicity
79
80 private final CRC32 _crc32 = new CRC32();
81 private byte[] _buf = new byte[1<<14];
82
83 private UnpackerImpl _p200;
84 private PropMap _props;
85
86 static {
87 // If loading from stand alone build uncomment this.
88 // System.loadLibrary("unpack");
89 java.security.AccessController.doPrivileged(
90 new java.security.PrivilegedAction<Void>() {
91 public Void run() {
92 System.loadLibrary("unpack");
93 return null;
94 }
95 });
96 initIDs();
97 }
98
99 NativeUnpack(UnpackerImpl p200) {
100 super();
101 _p200 = p200;
102 _props = p200.props;
103 p200._nunp = this;
104 }
105
106 // for JNI callbacks
107 static private Object currentInstance() {
108 UnpackerImpl p200 = (UnpackerImpl) Utils.getTLGlobals();
109 return (p200 == null)? null: p200._nunp;
110 }
|
70
71 // State for progress bar:
72 private long _byteCount; // bytes read in current segment
73 private int _segCount; // number of segs scanned
74 private int _fileCount; // number of files written
75 private long _estByteLimit; // estimate of eventual total
76 private int _estSegLimit; // ditto
77 private int _estFileLimit; // ditto
78 private int _prevPercent = -1; // for monotonicity
79
80 private final CRC32 _crc32 = new CRC32();
81 private byte[] _buf = new byte[1<<14];
82
83 private UnpackerImpl _p200;
84 private PropMap _props;
85
86 static {
87 // If loading from stand alone build uncomment this.
88 // System.loadLibrary("unpack");
89 java.security.AccessController.doPrivileged(
90 new java.security.PrivilegedAction<>() {
91 public Void run() {
92 System.loadLibrary("unpack");
93 return null;
94 }
95 });
96 initIDs();
97 }
98
99 NativeUnpack(UnpackerImpl p200) {
100 super();
101 _p200 = p200;
102 _props = p200.props;
103 p200._nunp = this;
104 }
105
106 // for JNI callbacks
107 static private Object currentInstance() {
108 UnpackerImpl p200 = (UnpackerImpl) Utils.getTLGlobals();
109 return (p200 == null)? null: p200._nunp;
110 }
|