org.csource.fastdfs
Class StructBase

java.lang.Object
  extended by org.csource.fastdfs.StructBase
Direct Known Subclasses:
StructGroupStat, StructStorageStat

public abstract class StructBase
extends java.lang.Object

C struct body decoder

Version:
Version 1.17
Author:
Happy Fish / YuQing

Nested Class Summary
protected static class StructBase.FieldInfo
           
 
Constructor Summary
StructBase()
           
 
Method Summary
protected  boolean booleanValue(byte[] bs, int offset, StructBase.FieldInfo filedInfo)
           
protected  byte byteValue(byte[] bs, int offset, StructBase.FieldInfo filedInfo)
           
protected  java.util.Date dateValue(byte[] bs, int offset, StructBase.FieldInfo filedInfo)
           
protected  int intValue(byte[] bs, int offset, StructBase.FieldInfo filedInfo)
           
protected  long longValue(byte[] bs, int offset, StructBase.FieldInfo filedInfo)
           
abstract  void setFields(byte[] bs, int offset)
          set fields
protected  java.lang.String stringValue(byte[] bs, int offset, StructBase.FieldInfo filedInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructBase

public StructBase()
Method Detail

setFields

public abstract void setFields(byte[] bs,
                               int offset)
set fields

Parameters:
bs - byte array
offset - start offset

stringValue

protected java.lang.String stringValue(byte[] bs,
                                       int offset,
                                       StructBase.FieldInfo filedInfo)

longValue

protected long longValue(byte[] bs,
                         int offset,
                         StructBase.FieldInfo filedInfo)

intValue

protected int intValue(byte[] bs,
                       int offset,
                       StructBase.FieldInfo filedInfo)

byteValue

protected byte byteValue(byte[] bs,
                         int offset,
                         StructBase.FieldInfo filedInfo)

booleanValue

protected boolean booleanValue(byte[] bs,
                               int offset,
                               StructBase.FieldInfo filedInfo)

dateValue

protected java.util.Date dateValue(byte[] bs,
                                   int offset,
                                   StructBase.FieldInfo filedInfo)