private PropertyKeyTokenRecord readPropertyKeyTokenRecord( int id, ReadableChannel channel ) throws IOException { // in_use(byte)+count(int)+key_blockId(int) byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( id ); record.setInUse( inUse ); record.setPropertyCount( channel.getInt() ); record.setNameId( channel.getInt() ); if ( readDynamicRecords( channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER ) == -1 ) { return null; } return record; }
private PropertyKeyTokenRecord readPropertyKeyTokenRecord( int id, ReadableChannel channel ) throws IOException { // in_use(byte)+count(int)+key_blockId(int) byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( id ); record.setInUse( inUse ); record.setPropertyCount( channel.getInt() ); record.setNameId( channel.getInt() ); if ( readDynamicRecords( channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER ) == -1 ) { return null; } return record; }
@Override public PropertyKeyTokenRecord clone() { PropertyKeyTokenRecord propertyKeyTokenRecord = new PropertyKeyTokenRecord( getIntId() ); propertyKeyTokenRecord.setInUse( inUse() ); if ( isCreated() ) { propertyKeyTokenRecord.setCreated(); } propertyKeyTokenRecord.setNameId( getNameId() ); propertyKeyTokenRecord.addNameRecords( getNameRecords() ); propertyKeyTokenRecord.setPropertyCount( getPropertyCount() ); return propertyKeyTokenRecord; } }
private Command visitPropertyKeyTokenCommand( ReadableChannel channel ) throws IOException { // id+in_use(byte)+count(int)+key_blockId(int) int id = channel.getInt(); byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( id ); record.setInUse( inUse ); record.setPropertyCount( channel.getInt() ); record.setNameId( channel.getInt() ); if ( readDynamicRecords( channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER ) == -1 ) { return null; } return new Command.PropertyKeyTokenCommand( null, record ); }
private Command visitPropertyKeyTokenCommand( ReadableChannel channel ) throws IOException { // id+in_use(byte)+count(int)+key_blockId(int) int id = channel.getInt(); byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( id ); record.setInUse( inUse ); record.setPropertyCount( channel.getInt() ); record.setNameId( channel.getInt() ); if ( readDynamicRecords( channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER ) == -1 ) { return null; } return new Command.PropertyKeyTokenCommand( null, record ); }
private PropertyKeyTokenRecord readPropertyKeyTokenRecord( int id, ReadableChannel channel ) throws IOException { // in_use(byte)+count(int)+key_blockId(int) byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( id ); record.setInUse( inUse ); record.setPropertyCount( channel.getInt() ); record.setNameId( channel.getInt() ); if ( readDynamicRecords( channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER ) == -1 ) { return null; } return record; }
private PropertyKeyTokenRecord readPropertyKeyTokenRecord( int id, ReadableChannel channel ) throws IOException { // in_use(byte)+count(int)+key_blockId(int) byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( id ); record.setInUse( inUse ); record.setPropertyCount( channel.getInt() ); record.setNameId( channel.getInt() ); if ( readDynamicRecords( channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER ) == -1 ) { return null; } return record; }
private Command visitPropertyKeyTokenCommand( ReadableChannel channel ) throws IOException { // id+in_use(byte)+count(int)+key_blockId(int) int id = channel.getInt(); byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( id ); record.setInUse( inUse ); record.setPropertyCount( channel.getInt() ); record.setNameId( channel.getInt() ); if ( readDynamicRecords( channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER ) == -1 ) { return null; } return new Command.PropertyKeyTokenCommand( null, record ); }
private Command visitPropertyKeyTokenCommand( ReadableChannel channel ) throws IOException { // id+in_use(byte)+count(int)+key_blockId(int) int id = channel.getInt(); byte inUseFlag = channel.get(); boolean inUse = false; if ( (inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue() ) { inUse = true; } else if ( inUseFlag != Record.NOT_IN_USE.byteValue() ) { throw new IOException( "Illegal in use flag: " + inUseFlag ); } PropertyKeyTokenRecord record = new PropertyKeyTokenRecord( id ); record.setInUse( inUse ); record.setPropertyCount( channel.getInt() ); record.setNameId( channel.getInt() ); if ( readDynamicRecords( channel, record, PROPERTY_INDEX_DYNAMIC_RECORD_ADDER ) == -1 ) { return null; } return new Command.PropertyKeyTokenCommand( null, record ); }
@Override public PropertyKeyTokenRecord clone() { PropertyKeyTokenRecord propertyKeyTokenRecord = new PropertyKeyTokenRecord( getIntId() ); propertyKeyTokenRecord.setInUse( inUse() ); if ( isCreated() ) { propertyKeyTokenRecord.setCreated(); } propertyKeyTokenRecord.setNameId( getNameId() ); propertyKeyTokenRecord.addNameRecords( getNameRecords() ); propertyKeyTokenRecord.setPropertyCount( getPropertyCount() ); return propertyKeyTokenRecord; } }