Package ch.ethz.ssh2.packets

Examples of ch.ethz.ssh2.packets.TypesReader.readString()


        throw new IOException("Badly formatted SSH_MSG_CHANNEL_REQUEST message, 'want reply' is true");

      String signame = tr.readString("US-ASCII");
      tr.readBoolean();
      tr.readString();
      tr.readString();

      if (tr.remain() != 0)
        throw new IOException("Badly formatted SSH_MSG_CHANNEL_REQUEST message");

      synchronized (c)
View Full Code Here


    if (c == null)
      throw new IOException("Unexpected SSH_MSG_CHANNEL_OPEN_FAILURE message for non-existent channel " + id);

    int reasonCode = tr.readUINT32();
    String description = tr.readString("UTF-8");

    String reasonCodeSymbolicName = null;

    switch (reasonCode)
    {
View Full Code Here

    /* Currently we do not support any kind of global request */

    TypesReader tr = new TypesReader(msg, 0, msglen);

    tr.readByte(); // skip packet type
    String requestName = tr.readString();
    boolean wantReply = tr.readBoolean();

    if (wantReply)
    {
      byte[] reply_failure = new byte[1];
View Full Code Here

    {
      throw new PacketTypeException(t);
    }

    int errorCode = tr.readUINT32();
    String errorMessage = tr.readString();
    listener.read(errorMessage);
    throw new SFTPException(errorMessage, errorCode);
  }

  private SFTPv3FileAttributes statBoth(String path, int statMethod) throws IOException
View Full Code Here

    {
      throw new PacketTypeException(t);
    }

    int errorCode = tr.readUINT32();
    String errorMessage = tr.readString();
    listener.read(errorMessage);
    throw new SFTPException(errorMessage, errorCode);
  }

  /**
 
View Full Code Here

      if (count != 1)
      {
        throw new IOException("The server sent an invalid SSH_FXP_NAME packet.");
      }

      return tr.readString(charsetName);
    }

    if (t != Packet.SSH_FXP_STATUS)
    {
      throw new PacketTypeException(t);
View Full Code Here

    {
      throw new PacketTypeException(t);
    }

    int errorCode = tr.readUINT32();
    String errorMessage = tr.readString();
    listener.read(errorMessage);
    throw new SFTPException(errorMessage, errorCode);
  }

  private void expectStatusOKMessage(int id) throws IOException
View Full Code Here

    if (errorCode == ErrorCodes.SSH_FX_OK)
    {
      return;
    }
    String errorMessage = tr.readString();
    listener.read(errorMessage);
    throw new SFTPException(errorMessage, errorCode);
  }

  /**
 
View Full Code Here

      if (count != 1)
      {
        throw new IOException("The server sent an invalid SSH_FXP_NAME packet.");
      }

      final String name = tr.readString(charsetName);
      listener.read(name);
      return name;
    }

    if (t != Packet.SSH_FXP_STATUS)
View Full Code Here

    {
      throw new PacketTypeException(t);
    }

    int errorCode = tr.readUINT32();
    String errorMessage = tr.readString();
    listener.read(errorMessage);
    throw new SFTPException(errorMessage, errorCode);
  }

  private List<SFTPv3DirectoryEntry> scanDirectory(byte[] handle) throws IOException
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.