public boolean putObject ( @ NotNull final StreamProvider streamProvider , @ NotNull final Meta meta , @ NotNull final Links links ) throws IOException { if ( links . getLinks ( ) . containsKey ( LinkType . Download ) ) { return false ; } final Link uploadLink = links . getLinks ( ) . get ( LinkType . Upload ) ; if ( uploadLink == null ) { throw new IOException ( "Upload link not found" ) ; } doRequest ( uploadLink , new ObjectPut ( streamProvider , meta . getSize ( ) ) , uploadLink . getHref ( ) ) ; final Link verifyLink = links . getLinks ( ) . get ( LinkType . Verify ) ; if ( verifyLink != null ) { doRequest ( verifyLink , new ObjectVerify ( meta ) , verifyLink . getHref ( ) ) ; } return true ; }
Upload object by metadata .