CubeOpenImageRequest request = new CubeOpenImageRequest();
request.setPubNum("CN101253698");
request.setPubDate("20080827");
request.setCategoryEnum(MD5Utils.CategoryEnum.ABSTRACT);
request.setOrder(1);
CubePatentFileResponse response = CLIENT.execute(request);
byte[] contentInBytes = cubePatentFileResponse.getFileByte();
File file = new File("/Users/file-test/test-abs.jpg");
if (!file.exists()) {
file.createNewFile();
}
FileOutputStream fileOutputStream = new FileOutputStream(file);
fileOutputStream.write(contentInBytes);
fileOutputStream.flush();
fileOutputStream.close();
{
"errorCode":"500",
"fileByte":"AAAAAAAAAAAAAA==",
"msg":"categoryEnum cannot be null!",
"success":false
}