Examples of openRead()


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

    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

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

      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

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

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

    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

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

    // 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

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

        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

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

    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

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

      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

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

      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

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

   
    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
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.