com.sshtools.j2ssh.connection
Class SshMsgChannelExtendedData

java.lang.Object
  |
  +--com.sshtools.j2ssh.transport.SshMessage
        |
        +--com.sshtools.j2ssh.connection.SshMsgChannelExtendedData

public class SshMsgChannelExtendedData
extends SshMessage

Implements the SSH_MSG_CHANNEL_EXT_DATA message.

Version:
1.0
Author:
Lee David Painter ( lee@sshtools.com )

Field Summary
protected static int SSH_EXTENDED_DATA_STDERR
          The ext data type code (currently the only type available)
protected static int SSH_MSG_CHANNEL_EXTENDED_DATA
          The message id
 
Constructor Summary
SshMsgChannelExtendedData()
          Constructor for the SshMsgChannelExtendedData object
SshMsgChannelExtendedData(long recipientChannel, int dataTypeCode, byte[] channelData)
          Constructor for the SshMsgChannelExtendedData object
 
Method Summary
protected  void constructByteArray(ByteArrayWriter baw)
          Abstract method implementation to construct a byte array containing the message.
protected  void constructMessage(ByteArrayReader bar)
          Abstract method implementation to extract the message from a byte array.
 byte[] getChannelData()
          Gets the channel data
 int getDataTypeCode()
          Gets the dataTypeCode
 java.lang.String getMessageName()
          Gets the message name for degugging
 long getRecipientChannel()
          Gets the recipient Channel id
 
Methods inherited from class com.sshtools.j2ssh.transport.SshMessage
fromByteArray, getMessageId, toByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SSH_MSG_CHANNEL_EXTENDED_DATA

protected static final int SSH_MSG_CHANNEL_EXTENDED_DATA
The message id

See Also:
Constant Field Values

SSH_EXTENDED_DATA_STDERR

protected static final int SSH_EXTENDED_DATA_STDERR
The ext data type code (currently the only type available)

See Also:
Constant Field Values
Constructor Detail

SshMsgChannelExtendedData

public SshMsgChannelExtendedData(long recipientChannel,
                                 int dataTypeCode,
                                 byte[] channelData)
Constructor for the SshMsgChannelExtendedData object

Parameters:
recipientChannel - The data's channel
dataTypeCode - The data type code
channelData - The data

SshMsgChannelExtendedData

public SshMsgChannelExtendedData()
Constructor for the SshMsgChannelExtendedData object

Method Detail

getMessageName

public java.lang.String getMessageName()
Gets the message name for degugging

Specified by:
getMessageName in class SshMessage
Returns:

getRecipientChannel

public long getRecipientChannel()
Gets the recipient Channel id

Returns:
The recipient channel id

getDataTypeCode

public int getDataTypeCode()
Gets the dataTypeCode

Returns:
The data type code

getChannelData

public byte[] getChannelData()
Gets the channel data

Returns:
The channel data

constructMessage

protected void constructMessage(ByteArrayReader bar)
                         throws InvalidMessageException
Abstract method implementation to extract the message from a byte array.

Specified by:
constructMessage in class SshMessage
Parameters:
bar - The data being read
Throws:
InvalidMessageException - Thrown if the data cannot be read

constructByteArray

protected void constructByteArray(ByteArrayWriter baw)
                           throws InvalidMessageException
Abstract method implementation to construct a byte array containing the message.

Specified by:
constructByteArray in class SshMessage
Parameters:
baw - The byte array being written
Throws:
InvalidMessageException - Thrown of the data cannot be written


Copyright © 2002 Sshtools.com. All Rights Reserved.