private static object ReadAConstantValue(LittleEndianInput in1) { byte grbit = (byte)in1.ReadByte(); switch (grbit) { case TYPE_EMPTY: in1.ReadLong(); // 8 byte 'not used' field return(EMPTY_REPRESENTATION); case TYPE_NUMBER: return(in1.ReadDouble()); case TYPE_STRING: return(StringUtil.ReadUnicodeString(in1)); case TYPE_BOOLEAN: return(ReadBoolean(in1)); case TYPE_ERROR_CODE: int errCode = in1.ReadUShort(); // next 6 bytes are Unused in1.ReadUShort(); in1.ReadInt(); return(ErrorConstant.ValueOf(errCode)); } throw new Exception("Unknown grbit value (" + grbit + ")"); }
private static object ReadAConstantValue(LittleEndianInput in1) { byte grbit = (byte)in1.ReadByte(); switch (grbit) { case TYPE_EMPTY: in1.ReadLong(); // 8 byte 'not used' field return EMPTY_REPRESENTATION; case TYPE_NUMBER: return in1.ReadDouble(); case TYPE_STRING: return StringUtil.ReadUnicodeString(in1); case TYPE_BOOLEAN: return ReadBoolean(in1); case TYPE_ERROR_CODE: int errCode = in1.ReadUShort(); // next 6 bytes are Unused in1.ReadUShort(); in1.ReadInt(); return ErrorConstant.ValueOf(errCode); } throw new Exception("Unknown grbit value (" + grbit + ")"); }
/** Create a NumberPtg from a byte array Read from disk */ public NumberPtg(LittleEndianInput in1) { field_1_value = in1.ReadDouble(); }