org.apache.hadoop.hbase.codec
Class BaseDecoder

java.lang.Object
  extended by org.apache.hadoop.hbase.codec.BaseDecoder
All Implemented Interfaces:
CellScanner, Codec.Decoder
Direct Known Subclasses:
KeyValueCodec.KeyValueDecoder, KeyValueCodecWithTags.KeyValueDecoder

@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"})
public abstract class BaseDecoder
extends Object
implements Codec.Decoder

TODO javadoc


Nested Class Summary
protected static class BaseDecoder.PBIS
           
 
Field Summary
protected  InputStream in
           
protected static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
BaseDecoder(InputStream in)
           
 
Method Summary
 boolean advance()
          Advance the scanner 1 cell.
 Cell current()
           
protected  InputStream getInputStream()
           
protected abstract  Cell parseCell()
          Extract a Cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

in

protected final InputStream in
Constructor Detail

BaseDecoder

public BaseDecoder(InputStream in)
Method Detail

advance

public boolean advance()
                throws IOException
Description copied from interface: CellScanner
Advance the scanner 1 cell.

Specified by:
advance in interface CellScanner
Returns:
true if the next cell is found and CellScanner.current() will return a valid Cell
Throws:
IOException

getInputStream

protected InputStream getInputStream()

parseCell

@Nonnull
protected abstract Cell parseCell()
                           throws IOException
Extract a Cell.

Returns:
a parsed Cell or throws an Exception. EOFException or a generic IOException maybe thrown if EOF is reached prematurely. Does not return null.
Throws:
IOException

current

public Cell current()
Specified by:
current in interface CellScanner
Returns:
the current Cell which may be mutable


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.