I am using following code to get uploaded file.
@POST
@Path("update")
@Consumes(MediaType.WILDCARD)
public boolean updateWorkBookMaster(MultipartFormDataInput input) {
try {
//get form data
Map<String, List<InputPart>> uploadForm = input.getFormDataMap();
//get uploaded file
List<InputPart> inputParts = uploadForm.get("workBookFile");
MultivaluedMap<String, String> header = inputParts.get(0).getHeaders();
InputStream inputStream = inputParts.get(0).getBody(InputStream.class, null);
byte[] bytes = IOUtils.toByteArray(inputStream);
now i want to check whether this byte[] is empty or not,
while debugging when i have not uploaded any file it shows its length as 9, why its 9 not 0.