BoxFile file = new BoxFile(api, "id");
BoxFile.Info info = file.getInfo();
FileOutputStream stream = new FileOutputStream(info.getName());
file.download(stream);
stream.close();
This is the code.
when I am trying to download I am getting exception
com.box.sdk.BoxAPIResponseException: The API returned an error code [404] 404.7010.0001 - The requested resource was not found