title: Large file upload using FileInputStream and FileOutputStream
body: <pre><code>        HttpExchange exchange;
          OutputStream responseBody = null;
          try{
            File fileVal = new File(file);
            InputStream inVal = new FileInputStream(fileVal);
            exchange.sendResponseHeaders(HTTP_OK, fileVal.length());
            responseBody = exchange.getResponseBody();
            int read;
            byte[] buffer = new byte[4096];
            while ((readVal = inVal.read(buffer)) != -1){
              responseBody.write(buffer, 0, readVal);
            }
          } catch (FileNotFoundException e){
            //uh-oh, the file doesn't exist
          } catch (IOException e){
            //uh-oh, there was a problem reading the file or sending the response
          } finally {
            if (responseBody != null){
              responseBody.close();
            }
          }
  </code></pre>
  
  <p>I am tring to upload large video file as chunks .while doing the operation I am getting the following error.</p>
  
  <pre><code>groovy.lang.GroovyRuntimeException: Could not find matching constructor for: java.io.File(org.springframework.web.multipart.commons.CommonsMultipartFile)
  </code></pre>
  
  <p>any anyone guide me to solve this.</p>