Mercurial Hosting > luan
annotate src/goodjava/lucene/logging/LogFile.java @ 1476:7d145095cc0b
lucene.logging check
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 19 Apr 2020 20:42:26 -0600 |
parents | 5e3870618377 |
children | 1f41e5921090 |
rev | line source |
---|---|
1461 | 1 package goodjava.lucene.logging; |
2 | |
3 import java.io.File; | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
4 import java.io.InputStream; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
5 import java.io.DataOutput; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
6 import java.io.DataOutputStream; |
1461 | 7 import java.io.RandomAccessFile; |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
8 import java.io.ByteArrayOutputStream; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
9 import java.io.ByteArrayInputStream; |
1461 | 10 import java.io.IOException; |
11 import java.util.List; | |
12 import java.util.Map; | |
13 import org.apache.lucene.index.Term; | |
14 import org.apache.lucene.search.Query; | |
15 import org.apache.lucene.search.MatchAllDocsQuery; | |
16 import org.apache.lucene.search.TermQuery; | |
17 import org.apache.lucene.search.PrefixQuery; | |
18 import org.apache.lucene.search.WildcardQuery; | |
19 import org.apache.lucene.search.TermRangeQuery; | |
20 import org.apache.lucene.search.PhraseQuery; | |
21 import org.apache.lucene.search.NumericRangeQuery; | |
22 import org.apache.lucene.search.BooleanQuery; | |
23 import org.apache.lucene.search.BooleanClause; | |
24 import org.apache.lucene.util.BytesRef; | |
1465 | 25 import goodjava.logging.Logger; |
26 import goodjava.logging.LoggerFactory; | |
1461 | 27 |
28 | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
29 public class LogFile { |
1465 | 30 private static final Logger logger = LoggerFactory.getLogger(LogFile.class); |
31 public final File file; | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
32 private final RandomAccessFile raf; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
33 private ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
34 private DataOutput out; |
1461 | 35 private long end; |
36 | |
37 public LogFile(File file,String mode) throws IOException { | |
1465 | 38 this.file = file; |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
39 this.raf = new RandomAccessFile(file,mode); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
40 this.out = new DataOutputStream(baos); |
1461 | 41 init(); |
42 } | |
43 | |
44 private void init() throws IOException { | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
45 if( raf.length() == 0 ) { |
1461 | 46 end = 8; |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
47 raf.writeLong(end); |
1461 | 48 } else { |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
49 raf.seek(0L); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
50 end = raf.readLong(); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
51 raf.seek(end); |
1461 | 52 } |
53 } | |
54 | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
55 private LogFile(LogFile lf) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
56 this.file = lf.file; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
57 this.raf = new RandomAccessFile(file,"r"); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
58 this.out = null; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
59 this.end = lf.end; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
60 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
61 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
62 public LogFile snapshot() throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
63 return new LogFile(this); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
64 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
65 |
1465 | 66 public String toString() { |
67 return "LogFile<" + file.getName() + ">"; | |
68 } | |
69 | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
70 public long end() { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
71 return end; |
1461 | 72 } |
73 | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
74 public LogInputStream input() throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
75 byte[] a = new byte[(int)end - 8]; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
76 raf.seek(8L); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
77 raf.readFully(a); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
78 return newLogInputStream(new ByteArrayInputStream(a)); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
79 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
80 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
81 protected LogInputStream newLogInputStream(InputStream in) { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
82 return new LogInputStream(in); |
1461 | 83 } |
84 | |
85 public void commit() throws IOException { | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
86 raf.seek(end); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
87 raf.write(baos.toByteArray()); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
88 //logger.info("size "+baos.size()); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
89 if( baos.size() < 10000 ) { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
90 baos.reset(); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
91 } else { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
92 baos = new ByteArrayOutputStream(); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
93 out = new DataOutputStream(baos); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
94 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
95 end = raf.getFilePointer(); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
96 raf.seek(0L); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
97 raf.writeLong(end); |
1461 | 98 } |
99 | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
100 public void rollback() throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
101 baos.reset(); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
102 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
103 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
104 static final int TYPE_NULL = 0; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
105 static final int TYPE_STRING = 1; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
106 static final int TYPE_INT = 2; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
107 static final int TYPE_LONG = 3; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
108 static final int TYPE_FLOAT = 4; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
109 static final int TYPE_DOUBLE = 5; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
110 static final int TYPE_BYTES = 6; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
111 static final int TYPE_LIST = 7; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
112 static final int TYPE_QUERY_MATCH_ALL_DOCS = 8; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
113 static final int TYPE_QUERY_TERM = 9; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
114 static final int TYPE_QUERY_PREFIX = 10; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
115 static final int TYPE_QUERY_WILDCARD = 11; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
116 static final int TYPE_QUERY_TERM_RANGE = 12; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
117 static final int TYPE_QUERY_PHRASE = 13; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
118 static final int TYPE_QUERY_NUMERIC_RANGE = 14; |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
119 static final int TYPE_QUERY_BOOLEAN = 15; |
1461 | 120 |
121 public void writeObject(Object obj) throws IOException { | |
122 if( obj==null ) { | |
123 writeByte(TYPE_NULL); | |
124 return; | |
125 } | |
126 if( obj instanceof String ) { | |
127 writeByte(TYPE_STRING); | |
128 writeUTF((String)obj); | |
129 return; | |
130 } | |
131 if( obj instanceof Integer ) { | |
132 writeByte(TYPE_INT); | |
133 writeInt((Integer)obj); | |
134 return; | |
135 } | |
136 if( obj instanceof Long ) { | |
137 writeByte(TYPE_LONG); | |
138 writeLong((Long)obj); | |
139 return; | |
140 } | |
141 if( obj instanceof Float ) { | |
142 writeByte(TYPE_FLOAT); | |
143 writeFloat((Float)obj); | |
144 return; | |
145 } | |
146 if( obj instanceof Double ) { | |
147 writeByte(TYPE_DOUBLE); | |
148 writeDouble((Double)obj); | |
149 return; | |
150 } | |
151 if( obj instanceof byte[] ) { | |
152 writeByte(TYPE_BYTES); | |
153 writeByteArray((byte[])obj); | |
154 return; | |
155 } | |
156 if( obj instanceof List ) { | |
157 writeByte(TYPE_LIST); | |
158 writeList((List)obj); | |
159 return; | |
160 } | |
161 if( obj instanceof MatchAllDocsQuery ) { | |
162 writeByte(TYPE_QUERY_MATCH_ALL_DOCS); | |
163 return; | |
164 } | |
165 if( obj instanceof TermQuery ) { | |
166 writeByte(TYPE_QUERY_TERM); | |
167 TermQuery query = (TermQuery)obj; | |
168 writeTerm( query.getTerm() ); | |
169 return; | |
170 } | |
171 if( obj instanceof PrefixQuery ) { | |
172 writeByte(TYPE_QUERY_PREFIX); | |
173 PrefixQuery query = (PrefixQuery)obj; | |
174 writeTerm( query.getPrefix() ); | |
175 return; | |
176 } | |
177 if( obj instanceof WildcardQuery ) { | |
178 writeByte(TYPE_QUERY_TERM_RANGE); | |
179 WildcardQuery query = (WildcardQuery)obj; | |
180 writeTerm( query.getTerm() ); | |
181 return; | |
182 } | |
183 if( obj instanceof TermRangeQuery ) { | |
184 writeByte(TYPE_QUERY_TERM_RANGE); | |
185 TermRangeQuery query = (TermRangeQuery)obj; | |
186 writeUTF( query.getField() ); | |
187 writeBytesRef( query.getLowerTerm() ); | |
188 writeBytesRef( query.getUpperTerm() ); | |
189 writeBoolean( query.includesLower() ); | |
190 writeBoolean( query.includesUpper() ); | |
191 return; | |
192 } | |
193 if( obj instanceof PhraseQuery ) { | |
194 writeByte(TYPE_QUERY_PHRASE); | |
195 PhraseQuery query = (PhraseQuery)obj; | |
196 Term[] terms = query.getTerms(); | |
197 int[] positions = query.getPositions(); | |
198 if( terms.length != positions.length ) | |
199 throw new RuntimeException(); | |
200 writeInt( terms.length ); | |
201 for( int i=0; i<terms.length; i++ ) { | |
202 writeTerm( terms[i] ); | |
203 writeInt( positions[i] ); | |
204 } | |
205 return; | |
206 } | |
207 if( obj instanceof NumericRangeQuery ) { | |
208 writeByte(TYPE_QUERY_NUMERIC_RANGE); | |
209 NumericRangeQuery query = (NumericRangeQuery)obj; | |
210 writeUTF( query.getField() ); | |
211 writeObject( query.getMin() ); | |
212 writeObject( query.getMax() ); | |
213 writeBoolean( query.includesMin() ); | |
214 writeBoolean( query.includesMax() ); | |
215 return; | |
216 } | |
217 if( obj instanceof BooleanQuery ) { | |
218 writeByte(TYPE_QUERY_BOOLEAN); | |
219 BooleanQuery query = (BooleanQuery)obj; | |
220 BooleanClause[] a = query.getClauses(); | |
221 writeInt(a.length); | |
222 for( BooleanClause bc : a ) { | |
223 writeQuery( bc.getQuery() ); | |
224 writeUTF( bc.getOccur().name() ); | |
225 } | |
226 return; | |
227 } | |
228 throw new IllegalArgumentException("invalid type for "+obj); | |
229 } | |
230 | |
231 public void writeByteArray(byte[] bytes) throws IOException { | |
232 writeInt(bytes.length); | |
233 write(bytes); | |
234 } | |
235 | |
236 public void writeList(List list) throws IOException { | |
237 writeInt(list.size()); | |
238 for( Object obj : list ) { | |
239 writeObject(obj); | |
240 } | |
241 } | |
242 | |
243 public void writeMap(Map map) throws IOException { | |
244 writeInt(map.size()); | |
245 for( Object obj : map.entrySet() ) { | |
246 Map.Entry entry = (Map.Entry)obj; | |
247 writeObject( entry.getKey() ); | |
248 writeObject( entry.getValue() ); | |
249 } | |
250 } | |
251 | |
252 public void writeQuery(Query query) throws IOException { | |
253 writeObject(query); | |
254 } | |
255 | |
256 public void writeBytesRef(BytesRef br) throws IOException { | |
257 writeInt(br.length); | |
258 write(br.bytes,0,br.length); | |
259 } | |
260 | |
261 public void writeTerm(Term term) throws IOException { | |
262 writeUTF(term.field()); | |
263 writeBytesRef( term.bytes() ); | |
264 } | |
265 | |
1476
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
266 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
267 public void writeByte(int v) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
268 out.writeByte(v); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
269 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
270 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
271 public void writeInt(int v) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
272 out.writeInt(v); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
273 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
274 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
275 public void writeLong(long v) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
276 out.writeLong(v); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
277 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
278 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
279 public void writeFloat(float v) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
280 out.writeFloat(v); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
281 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
282 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
283 public void writeDouble(double v) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
284 out.writeDouble(v); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
285 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
286 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
287 public void writeBoolean(boolean v) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
288 out.writeBoolean(v); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
289 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
290 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
291 public void writeUTF(String s) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
292 out.writeUTF(s); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
293 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
294 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
295 public void write(byte[] b) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
296 out.write(b); |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
297 } |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
298 |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
299 public void write(byte[] b, int off, int len) throws IOException { |
7d145095cc0b
lucene.logging check
Franklin Schmidt <fschmidt@gmail.com>
parents:
1465
diff
changeset
|
300 out.write(b,off,len); |
1461 | 301 } |
302 | |
303 } |