## ru.biosoft.plugins.jri.protocol
Class RPacket

    java.lang.Object
      ru.biosoft.plugins.jri.protocol.RPacket

    public class RPacket

extends java.lang.Object

small class encapsulating packets from/to Rserv

Version:
  $Id: RPacket.java,v 1.1 2009/06/15 06:26:56 tolstyh Exp $

Constructor Summary
`RPacket(int Rcmd, byte[] Rcont)` construct new packet

Method Summary
`int` | `getCmd()` get command
`byte[]` | `getCont()` get content
`int` | `getStat()` get status code of last response
`boolean` | `isError()` check last response for RESP_ERR
`boolean` | `isOk()` check last response for RESP_OK
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RPacket

    public RPacket(int Rcmd,
                   byte[] Rcont)

  construct new packet

  Parameters:
    `Rcmd` - command
    `Rcont` - content

Method Detail

### getCmd

    public int getCmd()

  get command

  Returns:
    command

### isOk

    public boolean isOk()

  check last response for RESP_OK

  Returns:
    `true` if last response was OK

### isError

    public boolean isError()

  check last response for RESP_ERR

  Returns:
    `true` if last response was ERROR

### getStat

    public int getStat()

  get status code of last response

  Returns:
    status code returned on last response

### getCont

    public byte[] getCont()

  get content

  Returns:
    inner package content

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Copyright © 2001-2009 Biosof.Ru. All Rights Reserved.