|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.util.CRC24
public final class CRC24
A class that can be used to compute a 24-bit CRC of a data stream.
Based on CRC-24 specified in RFC 2440.
Note: The byte ordering of the resulting checksum value depends on the protocol in which the CRC is used. The ordering used in a specified protocol might be different from the ordering used in this implementation. The output of this implementation can be reversed when used with such a protocol.
Field Summary | ||
---|---|---|
static int |
INITIAL_VALUE
|
Method Summary | ||
---|---|---|
static int |
update(int crc,
byte[] b)
Updates the checksum with the specified array of bytes. |
|
static int |
update(int crc,
byte[] b,
int offset,
int length)
Updates the current checksum with the specified array of bytes. |
|
static int |
update(int crc,
int b)
Updates the checksum with the specified byte. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INITIAL_VALUE
Method Detail |
---|
public static int update(int crc, int b)
crc
- The checksum to update.b
- The byte to update the checksum with.
public static int update(int crc, byte[] b)
crc
- The checksum to update.b
- The byte array to update the checksum with.
public static int update(int crc, byte[] b, int offset, int length)
crc
- The checksum to update.b
- The byte array to update the checksum with.off
- The start offset of the data.len
- The number of bytes to use for the update.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal