static BlockFactory createFactory ( COSAPIClient owner , String name ) { switch ( name ) { case COSConstants . FAST_UPLOAD_BUFFER_ARRAY : return new ArrayBlockFactory ( owner ) ; case COSConstants . FAST_UPLOAD_BUFFER_DISK : return new DiskBlockFactory ( owner ) ; default : throw new IllegalArgumentException ( "Unsupported block buffer" + " \"" + name + ' ' ) ; } }
Create a factory .