Package org.nutz.filepool

Examples of org.nutz.filepool.NutFilePool


public class UploadingContext {
   
    private static final Log log = Logs.get();

    public static UploadingContext create(String poolPath) {
        return create(new NutFilePool(poolPath));
    }
View Full Code Here


    public static UploadingContext create(FilePool pool) {
        return new UploadingContext(pool);
    }

    public UploadingContext(String poolPath) {
        this(new NutFilePool(poolPath, 2000));
    }
View Full Code Here

        context.setBufferSize(buffer);
        context.setCharset(charset);
    }

    public UploadAdaptor(String path, int buffer, String charset, int poolSize) {
        context = new UploadingContext(new NutFilePool(path, poolSize));
        context.setBufferSize(buffer);
        context.setCharset(charset);
    }
View Full Code Here

        context.setBufferSize(buffer);
        context.setCharset(charset);
    }

    public UploadAdaptor(String path, int buffer, String charset, int poolSize, int maxFileSize) {
        context = new UploadingContext(new NutFilePool(path, poolSize));
        context.setBufferSize(buffer);
        context.setCharset(charset);
        context.setMaxFileSize(maxFileSize);
    }
View Full Code Here

        try {
            home = Disks.normalize(home);
            if (home == null)
              home = config.get("pool-home").toString();
            long max = config.containsKey("pool-max") ? ((Number) config.get("pool-max")).longValue() : 2000;
            pool = new NutFilePool(home, max);
            pool = new SynchronizedFilePool(pool);
        } catch (Throwable e) {
            if (log.isWarnEnabled())
                log.warnf("NutDao FilePool create fail!! Blob and Clob Support is DISABLE!! Home="+home, e);
        }
View Full Code Here

*/
public class SystemSetup implements Setup {

  public void init(NutConfig config) {
    //在WEB-INF/rsdata下面放个文件池,用来存放记录
    Helper.filePool = new NutFilePool(Mvcs.getServletContext().getRealPath("/WEB-INF") + "/rsdata");
  }
View Full Code Here

TOP

Related Classes of org.nutz.filepool.NutFilePool

Copyright © 2018 www.massapicom. 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.