Enviar bytes por servlet. É possível?

Achei um exemplo na net que faz upload do video gravado para o server, mas não entendi direito, alguem pode ajudar?

[code]class UploadToServerThread extends Thread {

public void run() {
uploadVideo();
}
public void uploadVideo() {
try {
if ( output != null ) {
byte[] bytes = output.toByteArray();
DTOMediaStoreIn aDTOMediaStoreIn
= new DTOMediaStoreIn();
aDTOMediaStoreIn.inpByteArray = bytes;
aDTOMediaStoreIn.extension =
JMEUtility.findFileExtension(contentType);

        DTOMediaStoreOut aDTOMediaStoreOut =
           HttpCommandExecuter.getInstance().
              executeHttp(aDTOMediaStoreIn);

        if ( aDTOMediaStoreOut != null ) {
           if ( aDTOMediaStoreOut.successFlag != null &&
              aDTOMediaStoreOut.successFlag.equals("S") ) {
              //Show success alert
           }
           else {
              //...
           }
        }
        else {
           //...
        }
     }
     else {
        //...
     }
  }catch(Exception e) {
     e.printStackTrace();
     //...
  }

}

private DTOMediaStoreOut storeMedia(DTOMediaStoreIn inDTO) {

System.out.println(“Inside Media Store…”);
DTOMediaStoreOut ret = new DTOMediaStoreOut();
ret.successFlag = “X”;
if ( inDTO != null ) {

  String currentNo = getCurrentNo();
     
  FileOutputStream aFileOutputStream ;
  try {
     aFileOutputStream = 
        new FileOutputStream(fileLocationBase + "/" + 
              currentNo + "." + inDTO.extension);
     aFileOutputStream.write(inDTO.inpByteArray);
     aFileOutputStream.close();
     ret.successFlag = "S";
     System.out.println("Successfully stored the content");
  } catch (FileNotFoundException e) {
     e.printStackTrace();
  } catch (IOException e) {
     e.printStackTrace();
  }         

}
return ret;
}

}

}
[/code]