Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » [javadoc | source]
org.apache.tomcat.util
public class: MessageString [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.Ascii
      org.apache.tomcat.util.MessageBytes
         org.apache.tomcat.util.MessageString
This class is used to represent a string in an HTTP message, and can either be an actual String or a subarray of bytes.
Field Summary
protected  String str    The message String. 
Fields inherited from org.apache.tomcat.util.MessageBytes:
bytes,  offset,  length
Constructor:
 public MessageString() 
 public MessageString(String s) 
    Creates a new message string with the specified String object.
    Parameters:
    s - the String
 public MessageString(byte[] b,
    int off,
    int len) 
Method from org.apache.tomcat.util.MessageString Summary:
equals,   equals,   equalsIgnoreCase,   equalsIgnoreCase,   getBytes,   isSet,   length,   reset,   setBytes,   setString,   startsWith,   toDate,   toInteger,   toString,   write
Methods from org.apache.tomcat.util.MessageBytes:
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.MessageString Detail:
 public boolean equals(String s) 
    Compares this message string to the specified String object.
 public boolean equals(byte[] b,
    int off,
    int len) 
    Compares this message string to the specified subarray of bytes.
 public boolean equalsIgnoreCase(String s) 
    Compares this message string to the specified String object. Case is ignored in the comparison.
 public boolean equalsIgnoreCase(byte[] b,
    int off,
    int len) 
    Compares this message string to the specified subarray of bytes. Case is ignored in the comparison.
 public int getBytes(byte[] buf,
    int buf_offset) 
    Get the bytes of this message string in buf starting at buf_offset.
 public boolean isSet() 
    Returns true if the message string is set.
 public int length() 
    Returns the length of the message string.
 public  void reset() 
    Resets the message string to an uninitialized state.
 public  void setBytes(byte[] b,
    int off,
    int len) 
    Sets the message string to the specified bytes.
 public  void setString(String s) 
    Sets the message string to the specified String.
 public boolean startsWith(String s) 
    Returns true if the message string starts with the specified string.
 public long toDate(HttpDate d) throws IllegalArgumentException 
    Returns the message string parsed as a date.
 public int toInteger() throws NumberFormatException 
    Returns the message string parsed as an unsigned integer.
 public String toString() 
    Returns the message string as a String object.
 public  void write(ServletOutputStream out) throws IOException 
    Writes the message string to the specified servlet output stream.