KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > nutch > io > NullWritable


1 /* Copyright (c) 2003 The Nutch Organization. All rights reserved. */
2 /* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */
3
4 package net.nutch.io;
5
6 import java.io.*;
7
8 /** Singleton Writable with no data. */
9 public class NullWritable implements Writable {
10
11   private static final NullWritable THIS = new NullWritable();
12
13   private NullWritable() {} // no public ctor
14

15   /** Returns the single instance of this class. */
16   public static NullWritable get() { return THIS; }
17
18   public void readFields(DataInput in) throws IOException {}
19   public void write(DataOutput out) throws IOException {}
20 }
21
22
Popular Tags