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