Code example for DataOutput

Methods: writeBoolean

0
    } 
 
    @Override 
    public void serialize(ABoolean instance, DataOutput out) throws HyracksDataException {
        try { 
            out.writeBoolean(instance.getBoolean());
        } catch (IOException ioe) {
            throw new HyracksDataException(ioe);
        } 
    } 
 
    public static boolean getBoolean(byte[] bytes, int offset) {
        if (bytes[offset] == 0) {
            return false; 
        } else { 
            return true; 
        } 
    } 
 
}