Package com.caucho.vfs

Examples of com.caucho.vfs.Path.openRead()


      log.fine(this + " parsing " + persistenceXml.getURL());

    InputStream is = null;

    try {
      is = persistenceXml.openRead();

      ConfigPersistence persistence = new ConfigPersistence(root);

      new Config().configure(persistence, is,
          "com/caucho/amber/cfg/persistence-31.rnc");
View Full Code Here


      return generate(new QDocument(), null);

    Path path = getSearchPath().lookup(systemId);
   
    try {
      ReadStream is = path.openRead();
      Document doc;
      try {
  doc = parseXSL(is);
      } finally {
  is.close();
View Full Code Here

      return getSearchPath().lookup(href).openRead();
    else {
      Path path = getSearchPath().lookup(base).getParent().lookup(href);

      if (path.exists())
        return path.openRead();
      else
        return getSearchPath().lookup(href).openRead();
    }
  }
View Full Code Here

      return null; //throw new SQLException(L.l("table {0} does not exist", name));
    }

    String version = null;

    ReadStream is = path.openRead();
    try {
      // skip allocation table and fragment table
      is.skip(DATA_START + ROOT_DATA_OFFSET);

      StringBuilder sb = new StringBuilder();
View Full Code Here

      }
    } finally {
      is.close();
    }

    is = path.openRead();
    try {
      // skip allocation table and fragment table
      is.skip(DATA_START + ROOT_DATA_END);

      StringBuilder cb = new StringBuilder();
View Full Code Here

        env.warning(L.l("Cannot read file/URL '{0}'", data));

        return null;
      }

      ReadStream is = path.openRead();

      try {
        document = builder.parse(is);
      } finally {
        is.close();
View Full Code Here

        return font;

      Path path = env.lookupPwd(fontPath);

      if (path.canRead()) {
        ReadStream is = path.openRead();

        try {
          font = Font.createFont(Font.TRUETYPE_FONT, is);
        } finally {
          is.close();
View Full Code Here

          start = len;
        }

        if (path.canRead()) {
          ReadStream is = path.openRead();

          try {
            font = Font.createFont(Font.TRUETYPE_FONT, is);
          } finally {
            is.close();
View Full Code Here

    Path rootDirectory = getRootDirectory();
    Path path = rootDirectory.lookupNative(getRealPath(uripath));

    try {
      if (path.canRead())
        return path.openRead();
      else
        return null;
    } catch (IOException e) {
      log.log(Level.FINEST, e.toString(), e);
View Full Code Here

      byte []buffer = new byte[length];

      try {
        ReadStream is = null;
        try {
          is = path.openRead();

          is.readAll(buffer, 0, buffer.length);

          Class<?> cl = defineClass(name, buffer, 0, buffer.length,
                                 (CodeSource) null);
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.