net.nutch.fs
Class Block

java.lang.Object
  extended bynet.nutch.fs.Block
All Implemented Interfaces:
Comparable, Writable

public class Block
extends Object
implements Writable, Comparable

A Block is a Nutch FS primitive, identified by a long.

Author:
Mike Cafarella

Constructor Summary
Block()
           
Block(File f)
          Find the blockid from the given filename
Block(long blkid)
           
 
Method Summary
 int compareTo(Object o)
           
 long getBlockId()
           
 String getBlockName()
           
static boolean isBlockFilename(File f)
           
 void readFields(DataInput in)
          Reads the fields of this object from in.
 String toString()
           
 void write(DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Block

public Block()

Block

public Block(long blkid)

Block

public Block(File f)
Find the blockid from the given filename

Method Detail

isBlockFilename

public static boolean isBlockFilename(File f)

getBlockId

public long getBlockId()

getBlockName

public String getBlockName()

toString

public String toString()

write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Writes the fields of this object to out.

Specified by:
write in interface Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Reads the fields of this object from in. For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Throws:
IOException

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable


Copyright © 2004 The Nutch Organization.