Code example for DataOutput

Methods: writeBoolean, writeLong

0
        public void serialize(IRowCacheEntry cf, DataOutput out)
        { 
            assert cf != null; // unlike CFS we don't support nulls, since there is no need for that in the cache
            try 
            { 
                out.writeBoolean(cf instanceof RowCacheSentinel);
                if (cf instanceof RowCacheSentinel)
                    out.writeLong(((RowCacheSentinel) cf).sentinelId);
                else 
                    ColumnFamily.serializer.serialize((ColumnFamily) cf, out);
            } 
            catch (IOException e)
            { 
                throw new IOError(e);
            } 
        } 
 
        public IRowCacheEntry deserialize(DataInput in) throws IOException
        { 
            boolean isSentinel = in.readBoolean();
            if (isSentinel)