Code example for ObjectInput

Methods: readFloatreadObject

0
      return Util.<Class<? extends TermQuery>>asSet(TermQuery.class);
   } 
 
   @Override 
   public TermQuery readObject(final ObjectInput input) throws IOException, ClassNotFoundException {
      final float boost = input.readFloat();
      final Term term = (Term) input.readObject();
      TermQuery termQuery = new TermQuery(term);
      termQuery.setBoost(boost);
      return termQuery;
   } 
 
   @Override 
   public void writeObject(final ObjectOutput output, final TermQuery query) throws IOException {
      output.writeFloat(query.getBoost());
      output.writeObject(query.getTerm());
   } 
 
   @Override 
   public Integer getId() {
Contextual code suggestions in your IDE  Get Codota for Java