/** * Used to create copies of objects * * @return a copy of the internal TimestampTZWritable byte[] */ public byte[] getBytes() { checkBytes(); int len = getTotalLength(); byte[] b = new byte[len]; System.arraycopy(currentBytes, offset, b, 0, len); return b; }
/** * @return length of serialized TimestampTZWritable data. As a side effect, populates the internal * byte array if empty. */ private int getTotalLength() { checkBytes(); return getTotalLength(currentBytes, offset); }
@Override public void write(DataOutput dataOutput) throws IOException { checkBytes(); dataOutput.write(currentBytes, offset, getTotalLength()); }
public void writeToByteStream(ByteStream.RandomAccessOutput byteStream) { checkBytes(); byteStream.write(currentBytes, offset, getTotalLength()); }
case TIMESTAMPLOCALTZ: recordInfo.elementOffset = 0; recordInfo.elementSize = TimestampLocalTZWritable.getTotalLength(bytes, offset); break; case INTERVAL_YEAR_MONTH:
@Override public void write(DataOutput dataOutput) throws IOException { checkBytes(); dataOutput.write(currentBytes, offset, getTotalLength()); }
/** * @return length of serialized TimestampTZWritable data. As a side effect, populates the internal * byte array if empty. */ private int getTotalLength() { checkBytes(); return getTotalLength(currentBytes, offset); }
/** * Used to create copies of objects * * @return a copy of the internal TimestampTZWritable byte[] */ public byte[] getBytes() { checkBytes(); int len = getTotalLength(); byte[] b = new byte[len]; System.arraycopy(currentBytes, offset, b, 0, len); return b; }
public void writeToByteStream(ByteStream.RandomAccessOutput byteStream) { checkBytes(); byteStream.write(currentBytes, offset, getTotalLength()); }
case TIMESTAMPLOCALTZ: recordInfo.elementOffset = 0; recordInfo.elementSize = TimestampLocalTZWritable.getTotalLength(bytes, offset); break; case INTERVAL_YEAR_MONTH: