Package com.caucho.vfs

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


      out.print("</code>");
      out.println("<p>");

      ReadStream is;
      try {
        is = path.openRead();
      } catch (java.io.FileNotFoundException ex) {
        out.println("<font color='red'><b>File not found: " + Html.escapeHtml(path.getPath()) + "</b></font>");
        out.println("</body>");
        out.println("</html>");
        return;
View Full Code Here


    expandArchiveImpl();
      }

      Path path = getRootDirectory().lookup("META-INF/MANIFEST.MF");
      if (path.canRead()) {
        ReadStream is = path.openRead();
        try {
          _manifest = new Manifest(is);
        } catch (IOException e) {
          log.warning(L.l("Manifest file cannot be read for '{0}'.\n{1}",
                          getRootDirectory(), e));
View Full Code Here

    // XXX: change to a hash
    if (dependPath.canRead()) {
      ReadStream is = null;
      try {
        is = dependPath.openRead();

        String line = is.readLine();

        long digest;
View Full Code Here

        childArgs[childArgs.length - 1] = name;

        argMap.put("arguments", childArgs);
        argMap.put("File", Vfs.lookup());

        ReadStream is = xmlPath.openRead();
        Document doc = null;
        try {
          if (isStrict)
            doc = new Xml().parseDocument(is);
          else {
View Full Code Here

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

      StringBuilder sb = new StringBuilder("\n\n");

      is = path.openRead();
      int line = 0;
      String text;
      while ((text = is.readLine()) != null) {
  line++;
View Full Code Here

      HandlerBase base = (HandlerBase) objBase;
      if (obj instanceof InputStream)
        parser.parse((InputStream) obj, base);
      else if (obj instanceof Path) {
        Path path = (Path) obj;
        ReadStream is = path.openRead();
        try {
          parser.parse(is, base);
        } finally {
          is.close();
        }
View Full Code Here

      DefaultHandler base = (DefaultHandler) objBase;
      if (obj instanceof InputStream)
        parser.parse((InputStream) obj, base);
      else if (obj instanceof Path) {
        Path path = (Path) obj;
        ReadStream is = path.openRead();
        try {
          parser.parse(is, base);
        } finally {
          is.close();
        }
View Full Code Here

   
    if (obj instanceof InputStream)
      return parser.parse((InputStream) obj, systemId);
    else if (obj instanceof Path) {
      Path path = (Path) obj;
      ReadStream is = path.openRead();
      try {
        return parser.parse(is);
      } finally {
        is.close();
      }
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 = 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

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.