public static Map<String, String> read2bMap( ReadableChannel channel ) throws IOException { short size = channel.getShort(); Map<String, String> map = new HashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); String value = read2bLengthAndString( channel ); map.put( key, value ); } return map; }
private MutableObjectIntMap<String> readMap( ReadableChannel channel ) throws IOException { int size = getUnsignedShort( channel ); final MutableObjectIntMap<String> result = new ObjectIntHashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); int id = getUnsignedShort( channel ); if ( key == null ) { return null; } result.put( key, id ); } return result; }
private MutableObjectIntMap<String> readMap( ReadableChannel channel ) throws IOException { int size = getUnsignedShort( channel ); MutableObjectIntMap<String> result = new ObjectIntHashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); int id = getUnsignedShort( channel ); if ( key == null ) { return null; } result.put( key, id ); } return result; }
private MutableObjectIntMap<String> readMap( ReadableChannel channel ) throws IOException { byte size = channel.get(); MutableObjectIntMap<String> result = new ObjectIntHashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); int id = getUnsignedShort( channel ); if ( key == null ) { return null; } result.put( key, id ); } return result; }
private MutableObjectIntMap<String> readMap( ReadableChannel channel ) throws IOException { final byte size = channel.get(); final MutableObjectIntMap<String> result = new ObjectIntHashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); int id = getUnsignedShort( channel ); if ( key == null ) { return null; } result.put( key, id ); } return result; }
public static Map<String, String> read2bMap( ReadableChannel channel ) throws IOException { short size = channel.getShort(); Map<String, String> map = new HashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); String value = read2bLengthAndString( channel ); map.put( key, value ); } return map; }
private MutableObjectIntMap<String> readMap( ReadableChannel channel ) throws IOException { final byte size = channel.get(); final MutableObjectIntMap<String> result = new ObjectIntHashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); int id = getUnsignedShort( channel ); if ( key == null ) { return null; } result.put( key, id ); } return result; }
private MutableObjectIntMap<String> readMap( ReadableChannel channel ) throws IOException { byte size = channel.get(); MutableObjectIntMap<String> result = new ObjectIntHashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); int id = getUnsignedShort( channel ); if ( key == null ) { return null; } result.put( key, id ); } return result; }
private MutableObjectIntMap<String> readMap( ReadableChannel channel ) throws IOException { int size = getUnsignedShort( channel ); MutableObjectIntMap<String> result = new ObjectIntHashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); int id = getUnsignedShort( channel ); if ( key == null ) { return null; } result.put( key, id ); } return result; }
private MutableObjectIntMap<String> readMap( ReadableChannel channel ) throws IOException { int size = getUnsignedShort( channel ); final MutableObjectIntMap<String> result = new ObjectIntHashMap<>( size ); for ( int i = 0; i < size; i++ ) { String key = read2bLengthAndString( channel ); int id = getUnsignedShort( channel ); if ( key == null ) { return null; } result.put( key, id ); } return result; }