Package com.caucho.vfs

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


      InputStream is = null;
      try {
  long length = path.getLength();
 
  is = path.openRead();

  OutputStream out = inode.openOutputStream();

  TempBuffer tempBuffer = TempBuffer.allocate();
  byte []buffer = tempBuffer.getBuffer();
View Full Code Here


      if (_path != null)
  path = _path.lookup(urlString + "." + ext);
      else
  path = Vfs.lookup(urlString + "." + ext);

      is = path.openRead();
      StringBuilder sb = new StringBuilder();
      int ch;

      while (Character.isWhitespace((ch = is.read()))) {
      }
View Full Code Here

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

        long lastModified = ois.readLong();
        long length = ois.readLong();
View Full Code Here

          && inc._stream.getPath().equals(include) && ! allowDuplicate)
        throw error(L.l("circular include of '{0}'.  A JSP file may not include itself.", include));
    }

    try {
      addInclude(include.openRead(), newUrlPwd);
    } catch (IOException e) {
      log.log(Level.WARNING, e.toString(), e);

      if (include.exists())
        throw error(L.l("can't open include of '{0}'.  '{1}' exists but it's not readable.",
View Full Code Here

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

    ReadStream is = path.openRead();
   
    try {
      Xml xml = new Xml();

      VerifierHandler handler = getVerifierHandler();
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

    path = getPath(name);

    if (path != null && path.canRead()) {
      try {
        return path.openRead();
      } catch (Exception e) {
      }
    }

    return null;
View Full Code Here

      throw new FileNotFoundException(L.l("Can't find class file '{0}'",
                                          path.getNativePath()));
   
    byte []buffer = new byte[length];
     
    ReadStream is = path.openRead();
    try {
      is.readAll(buffer, 0, buffer.length);
    } finally {
      is.close();
    }
View Full Code Here

    } catch (Throwable e) {
    }
 
    path = getScriptPath().lookup(name);

    ReadStream is = path.openRead();
    try {
      return parse(is, name, 1);
    } finally {
      is.close();
    }
View Full Code Here

        long lastModified = classPath.getLastModified();

        if (length < 0)
          throw new IOException("class loading failed because class file '" + classPath + "' does not have a positive length.  Possibly the file has been overwritten");

        ReadStream is = classPath.openRead();

        try {
          buffer.setLength((int) length);

          int results = is.readAll(buffer.getBuffer(), 0, (int) length);
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.