Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » [javadoc | source]
org.apache.tomcat.util
public class: MessageBytes [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.Ascii
      org.apache.tomcat.util.MessageBytes

Direct Known Subclasses:
    MessageString

This class is used to represent a subarray of bytes in an HTTP message.
Field Summary
protected  byte[] bytes    The message bytes. 
protected  int offset    The start offset of the bytes. 
protected  int length    The length of the bytes. 
Constructor:
 public MessageBytes() 
 public MessageBytes(byte[] b,
    int off,
    int len) 
Method from org.apache.tomcat.util.MessageBytes Summary:
equals,   equals,   equalsIgnoreCase,   equalsIgnoreCase,   getBytes,   getBytes,   getLength,   getOffset,   isSet,   length,   reset,   setBytes,   startsWith,   toDate,   toInteger,   toString,   write
Methods from org.apache.tomcat.util.Ascii:
isAlpha,   isDigit,   isLower,   isUpper,   isWhite,   parseInt,   toLower,   toUpper
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.MessageBytes Detail:
 public boolean equals(String s) 
    Compares the message bytes to the specified String object.
 public boolean equals(byte[] b,
    int off,
    int len) 
    Compares the message bytes to the specified subarray of bytes.
 public boolean equalsIgnoreCase(String s) 
    Compares the message bytes to the specified String object. Case is ignored in the comparison.
 public boolean equalsIgnoreCase(byte[] b,
    int off,
    int len) 
    Compares the message bytes to the specified subarray of bytes. Case is ignored in the comparison.
 public byte[] getBytes() 
    Returns the message bytes.
 public int getBytes(byte[] buf,
    int buf_offset) 
    Puts the message bytes in buf starting at buf_offset.
 public int getLength() 
    Returns the length of the bytes.
 public int getOffset() 
    Returns the start offset of the bytes.
 public boolean isSet() 
    Returns true if the message bytes have been set.
 public int length() 
    Returns the length of the message bytes.
 public  void reset() 
    Resets the message bytes to an uninitialized state.
 public  void setBytes(byte[] b,
    int off,
    int len) 
    Sets the message bytes to the specified subarray of bytes.
 public boolean startsWith(String s) 
    Returns true if the message bytes starts with the specified string.
 public long toDate(HttpDate d) throws IllegalArgumentException 
    Returns the message bytes parsed as a date.
 public int toInteger() throws NumberFormatException 
    Returns the message bytes parsed as an unsigned integer.
 public String toString() 
    Returns the message bytes as a String object.
 public  void write(OutputStream out) throws IOException 
    Writes the message bytes to the specified output stream.