Package org.nutz.filepool

Examples of org.nutz.filepool.FilePool.createFile()


              br.skipMark();
            } while (mm == MarkMode.NOT_FOUND);
          }
          // 保存临时文件
          else {
            File tmp = tmps.createFile(meta.getFileExtension());
            OutputStream ops = null;
            try {
              ops = new BufferedOutputStreamnew FileOutputStream(tmp),
                              bufferSize * 2);
              // 需要限制文件大小
View Full Code Here


                            br.skipMark();
                        } while (mm == MarkMode.NOT_FOUND);
                    }
                    // 保存临时文件
                    else {
                        File tmp = tmps.createFile(meta.getFileExtension());
                        OutputStream ops = null;
                        try {
                            ops = new BufferedOutputStream(    new FileOutputStream(tmp),
                                                            bufferSize * 2);
                            // 需要限制文件大小
View Full Code Here

        //if (!context.isContentTypeAccepted(meta.getContentType())) {
        //    throw new UploadUnsupportedFileTypeException(meta);
        //}
       
        //开始读取数据
        File tmp = tmps.createFile(meta.getFileExtension());
        OutputStream ops = null;
        try {
            ops = new BufferedOutputStream(    new FileOutputStream(tmp),bufferSize * 2);
            Streams.writeAndClose(ops, req.getInputStream());
           
View Full Code Here

                            br.skipMark();
                        } while (mm == MarkMode.NOT_FOUND);
                    }
                    // 保存临时文件
                    else {
                        File tmp = tmps.createFile(meta.getFileExtension());
                        OutputStream ops = null;
                        try {
                            ops = new BufferedOutputStream(    new FileOutputStream(tmp),
                                                            bufferSize * 2);
                            // 需要限制文件大小
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.