Mercurial Hosting > luan
comparison src/goodjava/lucene/logging/LogFile.java @ 1462:bfbf9c9c1586
minor
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sun, 29 Mar 2020 09:55:59 -0600 |
| parents | e5d48b85351c |
| children | 5e3870618377 |
comparison
equal
deleted
inserted
replaced
| 1461:e5d48b85351c | 1462:bfbf9c9c1586 |
|---|---|
| 19 import org.apache.lucene.search.BooleanQuery; | 19 import org.apache.lucene.search.BooleanQuery; |
| 20 import org.apache.lucene.search.BooleanClause; | 20 import org.apache.lucene.search.BooleanClause; |
| 21 import org.apache.lucene.util.BytesRef; | 21 import org.apache.lucene.util.BytesRef; |
| 22 | 22 |
| 23 | 23 |
| 24 public final class LogFile extends RandomAccessFile { | 24 public class LogFile extends RandomAccessFile { |
| 25 private long end; | 25 private long end; |
| 26 | 26 |
| 27 public LogFile(File file,String mode) throws IOException { | 27 public LogFile(File file,String mode) throws IOException { |
| 28 super(file,mode); | 28 super(file,mode); |
| 29 init(); | 29 init(); |
| 191 throw new IllegalArgumentException("invalid type for "+obj); | 191 throw new IllegalArgumentException("invalid type for "+obj); |
| 192 } | 192 } |
| 193 | 193 |
| 194 public Object readObject() throws IOException { | 194 public Object readObject() throws IOException { |
| 195 int type = readByte(); | 195 int type = readByte(); |
| 196 return readObject(type); | |
| 197 } | |
| 198 | |
| 199 protected Object readObject(int type) throws IOException { | |
| 196 switch(type) { | 200 switch(type) { |
| 197 case TYPE_NULL: | 201 case TYPE_NULL: |
| 198 return null; | 202 return null; |
| 199 case TYPE_STRING: | 203 case TYPE_STRING: |
| 200 return readUTF(); | 204 return readUTF(); |
