Package com.caucho.vfs

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


    Path sub = _pwd.lookup(uri);

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

      InputSource source = new InputSource(is);
      source.setSystemId(uri);

      CompactParser parser = new CompactParser();
View Full Code Here


  public Schema compileSchema(String url)
    throws SAXException, IOException
  {
    Path path = Vfs.lookup(url);

    ReadStream is = path.openRead();
    try {
      InputSource source = new InputSource(is);
      source.setSystemId(url);

      return compileSchema(source);
View Full Code Here

      manifestPath = jar.lookup("META-INF/MANIFEST.MF");
      contextPath = path.getParent();
    }

    if (manifestPath.canRead()) {
      ReadStream is = manifestPath.openRead();
      try {
        Manifest manifest = new Manifest(is);

        Attributes main = manifest.getMainAttributes();
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

        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

        try {
          Path path = env.getPwd().lookup(value.toString());

          if (path.exists()) {
            in = path.openRead();

            StringBuilder sb = new StringBuilder();

            int ch;
            while ((ch = in.read()) >= 0) {
View Full Code Here

    Path path = mergePath.lookup("com/caucho/quercus/lib/pdf/font/" + name + ".afm");

    if (! path.canRead())
      throw new FileNotFoundException(L.l("Can't find font {0}", name));

    _is = path.openRead();

    try {
      return parseTop();
    } finally {
      _is.close();
View Full Code Here

    try {
      Path path = Vfs.lookup(_systemId);

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

        lines.append("\n");

        try {
          for (int i = 1; i < _line + 3; i++) {
View Full Code Here

      int retry = 3;
      for (int i = 0; i < retry; i++) {
        long length = -1;
       
        ReadStream is = classPath.openRead();

        try {
          length = classPath.getLength();
          long lastModified = classPath.getLastModified();
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.