@Override public double doubleValue() { return getByte(); } }
@Override public IPointable createPointable() { return new BytePointable(); }
public void setByte(byte value) { setByte(bytes, start, value); }
/** * Derived Numeric Datatypes */ public void convertByte(BytePointable bytep, DataOutput dOut) throws SystemException, IOException { abvsInner.reset(); FunctionHelper.writeNumberWithPadding(bytep.longValue(), 1, dOutInner); sendStringDataOutput(dOut); }
private void printByte(PrintStream ps, TaggedValuePointable tvp) { BytePointable bp = pp.takeOne(BytePointable.class); try { tvp.getValue(bp); ps.print(bp.byteValue()); } finally { pp.giveBack(bp); } }
@Override public int compareTo(IPointable pointer) { return compareTo(pointer.getByteArray(), pointer.getStartOffset(), pointer.getLength()); }
value = tp.bytep.doubleValue(); break;
public static void setTime(byte[] bytes, int start, long hour, long minute, long second, long timezoneHour, long timezoneMinute) { BytePointable.setByte(bytes, start + HOUR_OFFSET, (byte) hour); BytePointable.setByte(bytes, start + MINUTE_OFFSET, (byte) minute); IntegerPointable.setInteger(bytes, start + MILLISECOND_OFFSET, (byte) second); BytePointable.setByte(bytes, start + TIMEZONE_HOUR_OFFSET, (byte) timezoneHour); BytePointable.setByte(bytes, start + TIMEZONE_MINUTE_OFFSET, (byte) timezoneMinute); }
value = tp.bytep.longValue(); break;
if (bp.byteValue() == 0) { booleanResult = false;
@Override public byte byteValue() { return getByte(); }
public static void setDate(byte[] bytes, int start, long year, long month, long day, long timezoneHour, long timezoneMinute) { ShortPointable.setShort(bytes, start + YEAR_OFFSET, (short) year); BytePointable.setByte(bytes, start + MONTH_OFFSET, (byte) month); BytePointable.setByte(bytes, start + DAY_OFFSET, (byte) day); BytePointable.setByte(bytes, start + TIMEZONE_HOUR_OFFSET, (byte) timezoneHour); BytePointable.setByte(bytes, start + TIMEZONE_MINUTE_OFFSET, (byte) timezoneMinute); }
value = tp.bytep.longValue(); break;
@Override public long longValue() { return getByte(); }
public static void setDateTime(byte[] bytes, int start, long year, long month, long day, long hour, long minute, long milliSecond, long timezoneHour, long timezoneMinute) { ShortPointable.setShort(bytes, start + YEAR_OFFSET, (short) year); BytePointable.setByte(bytes, start + MONTH_OFFSET, (byte) month); BytePointable.setByte(bytes, start + DAY_OFFSET, (byte) day); BytePointable.setByte(bytes, start + HOUR_OFFSET, (byte) hour); BytePointable.setByte(bytes, start + MINUTE_OFFSET, (byte) minute); IntegerPointable.setInteger(bytes, start + MILLISECOND_OFFSET, (int) milliSecond); BytePointable.setByte(bytes, start + TIMEZONE_HOUR_OFFSET, (byte) timezoneHour); BytePointable.setByte(bytes, start + TIMEZONE_MINUTE_OFFSET, (byte) timezoneMinute); }
@Override public int hash() { return getByte(); }
@Override public void finish() throws IOException { byte header = 0; if (nsCount > 0) { header |= ElementNodePointable.NS_CHUNK_EXISTS_MASK; } if (attrCount > 0) { header |= ElementNodePointable.ATTRIBUTES_CHUNK_EXISTS_MASK; } if (childrenCount > 0) { header |= ElementNodePointable.CHILDREN_CHUNK_EXISTS_MASK; } BytePointable.setByte(mvs.getByteArray(), headerOffset, header); }
public static long getTimezoneHour(byte[] bytes, int start) { return (long) BytePointable.getByte(bytes, start + TIMEZONE_HOUR_OFFSET); }