public class AtReply
extends java.lang.Object
GsmSmsService.sendATCommand(String)
Modifier and Type | Method and Description |
---|---|
int |
getCmsCode()
Returns the Message Service Failure Result Code (+CMS ERROR) if available
or 0 if no CMS code is present.
|
java.lang.String |
getCmsText()
Returns a text-representation of the Message Service Failure Result Code
or null if no CMS error code is present.
|
java.lang.String |
getReply()
Returns the modem reply text.
|
java.io.BufferedReader |
getReplyReader()
Returns a BufferedReader for the modem answer.
|
boolean |
isError()
Returns true if the reply indicates an error (the Modem replied
with either "ERROR" or "+CMS ERROR").
|
java.lang.String |
toString() |
public boolean isError()
public java.lang.String getReply()
The reply text never contains the status (e.g. "OK" or "ERROR"). If the modem reply contains multiple lines, the string returned contains newline characters ('\n'). If the modem replies with "OK" or "ERROR" only, getReply() returns null. Local echoing by the modem will be filtered out.
Let's assume that the modem replied to the command "AT+CGSN" with the following data (local echo is enabled):AT+CGSN<cr><lf> 123456789012345<lf> OK<lf>For the reply above, getReply() will return the String "
123456789012345
".public java.io.BufferedReader getReplyReader()
public int getCmsCode()
public java.lang.String getCmsText()
public java.lang.String toString()
toString
in class java.lang.Object
object XP, Inc. © 2000-2013. All rights reserved object XP