Package com.ibm.commons.util.io

Examples of com.ibm.commons.util.io.LookAheadInputStream.startsWith()


          if(!item.isFormField()) {
            String fileName = item.getName();
            InputStream is = item.getInputStream();
            try {
              LookAheadInputStream lis = new LookAheadInputStream(is, 16);
              if(!lis.startsWith("PK")) {
                result(req, resp, HttpServletResponse.SC_BAD_REQUEST, "The uploaded file is not a zip file");
                return;
              }
              JsonImport imp = new JsonImport(new JsonImport.ZipImportSource(lis));
             
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.