|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleafchat.core.api.Msg
com.leafdigital.irc.api.IRCMsg
public class IRCMsg
Represents a parsed message received from an IRC server, parsed
Field Summary | |
---|---|
static MessageInfo |
info
Message info for scripting. |
Fields inherited from class leafchat.core.api.Msg |
---|
PRIORITY_AFTERNORMAL, PRIORITY_BEFORENORMAL, PRIORITY_EARLY, PRIORITY_FIRST, PRIORITY_LAST, PRIORITY_LATE, PRIORITY_NORMAL |
Constructor Summary | |
---|---|
IRCMsg()
|
Method Summary | |
---|---|
static byte[] |
constructBytes(java.lang.String iso)
|
static byte[] |
constructBytes(java.lang.String isoPart,
byte[] secondPart)
Creates bytes suitable for an IRC message where the first part is in ISO 8859-1 and the second part has been converted to bytes |
java.lang.String |
convertEncoding(byte[] data)
|
static java.lang.String |
convertISO(byte[] data)
Converts text using ISO 8859-1 which is generally appropriate for 'system' parts of a message |
java.lang.String |
getCommand()
|
byte[] |
getCommandBytes()
|
byte[] |
getLine()
|
java.lang.String |
getLineISO()
|
java.lang.String |
getParamISO(int index)
|
byte[][] |
getParams()
|
java.lang.String |
getPrefix()
|
byte[] |
getPrefixBytes()
|
Server |
getServer()
|
boolean |
hasEncoding()
|
boolean |
includesPostfix()
|
void |
init(IRCMsg base)
|
void |
init(Server s,
byte[] line,
byte[] prefix,
byte[] command,
byte[][] params,
boolean includesPostfix)
Init with actual parameters |
boolean |
isParamInteger(int index)
|
void |
setEncoding(IRCEncoding.EncodingInfo encoding)
Sets up encoding for message (used by system only). |
static byte[][] |
splitBytes(byte[] data)
Given an array of bytes, splits it on spaces. |
java.lang.String |
toString()
|
Methods inherited from class leafchat.core.api.Msg |
---|
isHandled, isStopped, markHandled, markStopped, sequenceBefore, setSequence, setSequence |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static MessageInfo info
Constructor Detail |
---|
public IRCMsg()
Method Detail |
---|
public static java.lang.String convertISO(byte[] data)
data
- Bytes
public java.lang.String convertEncoding(byte[] data)
data
- Bytes from this message
public static byte[][] splitBytes(byte[] data)
data
- Data to split
public static byte[] constructBytes(java.lang.String isoPart, byte[] secondPart)
isoPart
- ISO part of text (may be null)secondPart
- Other character set part (may be null)
public static byte[] constructBytes(java.lang.String iso)
iso
- String that should be converted to bytes
public void setEncoding(IRCEncoding.EncodingInfo encoding)
encoding
- Encodingpublic boolean hasEncoding()
public void init(IRCMsg base)
base
- Message to copy parameters frompublic void init(Server s, byte[] line, byte[] prefix, byte[] command, byte[][] params, boolean includesPostfix)
s
- Serverline
- Original lineprefix
- Prefix (or null)command
- Commandparams
- ParametersincludesPostfix
- Whether or not the last param was a postfix typepublic Server getServer()
public byte[] getLine()
public java.lang.String getLineISO()
public byte[] getPrefixBytes()
public java.lang.String getPrefix()
public byte[] getCommandBytes()
public java.lang.String getCommand()
public byte[][] getParams()
public java.lang.String getParamISO(int index)
index
- Parameter index
public boolean isParamInteger(int index)
index
- Parameter index
public boolean includesPostfix()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |