Examples of AutoCloseInputStream


Examples of org.h2.util.AutoCloseInputStream

        case FILE_READ: {
            session.getUser().checkAdmin();
            String fileName = v0.getString();
            boolean blob = argList.length == 1;
            try {
                InputStream in = new AutoCloseInputStream(FileUtils.newInputStream(fileName));
                if (blob) {
                    result = database.getLobStorage().createBlob(in, -1);
                } else {
                    Reader reader;
                    if (v1 == ValueNull.INSTANCE) {
View Full Code Here

Examples of org.h2.util.AutoCloseInputStream

        case FILE_READ: {
            session.getUser().checkAdmin();
            String fileName = v0.getString();
            boolean blob = argList.length == 1;
            try {
                InputStream in = new AutoCloseInputStream(FileUtils.newInputStream(fileName));
                if (blob) {
                    result = database.getLobStorage().createBlob(in, -1);
                } else {
                    Reader reader;
                    if (v1 == ValueNull.INSTANCE) {
View Full Code Here

Examples of org.h2.util.AutoCloseInputStream

        case FILE_READ: {
            session.getUser().checkAdmin();
            String fileName = v0.getString();
            boolean blob = argList.length == 1;
            try {
                InputStream in = new AutoCloseInputStream(IOUtils.openFileInputStream(fileName));
                if (blob) {
                    result = database.getLobStorage().createBlob(in, -1);
                } else {
                    Reader reader;
                    if (v1 == ValueNull.INSTANCE) {
View Full Code Here

Examples of org.lealone.util.AutoCloseInputStream

        case FILE_READ: {
            session.getUser().checkAdmin();
            String fileName = v0.getString();
            boolean blob = args.length == 1;
            try {
                InputStream in = new AutoCloseInputStream(FileUtils.newInputStream(fileName));
                if (blob) {
                    result = database.getLobStorage().createBlob(in, -1);
                } else {
                    Reader reader;
                    if (v1 == ValueNull.INSTANCE) {
View Full Code Here

Examples of org.more.util.io.AutoCloseInputStream

        String protocol = resourceURL.getProtocol();
        File path = new File(URLDecoder.decode(resourceURL.getFile(), "utf-8"));
        if (protocol.equals("file") == true) {
            //文件
            if (path.canRead() == true && path.isFile() == true) {
                return new AutoCloseInputStream(new FileInputStream(path));
            }
        } else if (protocol.equals("jar") == true) {
            //JAR文件
            JarFile jar = ((JarURLConnection) resourceURL.openConnection()).getJarFile();
            String jarFile = jar.getName().replace("\\", "/");
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.