public DataStore createDataStore ( final File file , final String name , final int fromline , final DataStore . Separator separator , final DataStore . StringDelimiter delimiter ) { return invoke ( DATA_STORES , new RequestClosure < JsonObject > ( ) { @ Override public JsonObject call ( Invocation . Builder request ) { MultiPart form = new FormDataMultiPart ( ) . field ( "name" , name ) . field ( "fromline" , Integer . toString ( fromline ) ) . field ( "separator" , separator . param ( ) ) . field ( "delimiter" , delimiter . param ( ) ) . bodyPart ( new FileDataBodyPart ( "file" , file , new MediaType ( "text" , "csv" ) ) ) ; return request . post ( Entity . entity ( form , form . getMediaType ( ) ) , JsonObject . class ) ; } } , new ResponseClosure < JsonObject , DataStore > ( ) { @ Override public DataStore call ( JsonObject json ) { return new DataStore ( json ) ; } } ) ; }
Creates a new data store .