|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QByteArrayMatcher
public class QByteArrayMatcher
The QByteArrayMatcher class holds a sequence of bytes that can be quickly matched in a byte array. This class is useful when you have a sequence of bytes that you want to repeatedly match against some byte arrays (perhaps in a loop), or when you want to search for the same sequence of bytes multiple times in the same byte array. Using a matcher object and indexIn() is faster than matching a plain QByteArray with QByteArray::indexOf() if repeated matching takes place. This class offers no benefit if you are doing one-off byte array matches.
Create the QByteArrayMatcher with the QByteArray you want to search for. Then call indexIn() on the QByteArray that you want to search.
QByteArray, and QStringMatcher.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
|---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
| Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
|---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
| Field Summary |
|---|
| Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
|---|
currentSender |
| Constructor Summary | |
|---|---|
QByteArrayMatcher()
Constructs an empty byte array matcher that won't match anything. |
|
QByteArrayMatcher(QByteArray pattern)
Constructs a byte array matcher that will search for pattern. |
|
QByteArrayMatcher(QByteArrayMatcher other)
Copies the other byte array matcher to this byte array matcher. |
|
| Method Summary | |
|---|---|
QByteArrayMatcher |
clone()
This method is reimplemented for internal reasons |
int |
indexIn(QByteArray ba)
Searches the byte array ba, from byte position from (default 0, i. |
int |
indexIn(QByteArray ba,
int from)
Searches the byte array ba, from byte position from (default 0, i. |
QByteArray |
pattern()
Returns the byte array pattern that this byte array matcher will search for. |
void |
setPattern(QByteArray pattern)
Sets the byte array that this byte array matcher will search for to pattern. |
| Methods inherited from class com.trolltech.qt.QtJambiObject |
|---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
| Methods inherited from class com.trolltech.qt.QSignalEmitter |
|---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
| Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
|---|
__qt_signalInitialization |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.trolltech.qt.QtJambiInterface |
|---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
| Constructor Detail |
|---|
public QByteArrayMatcher()
setPattern() to give it a pattern to match.
public QByteArrayMatcher(QByteArray pattern)
indexIn() to perform a search.
public QByteArrayMatcher(QByteArrayMatcher other)
| Method Detail |
|---|
public final int indexIn(QByteArray ba)
pattern() that was set in the constructor or in the most recent call to setPattern(). Returns the position where the pattern() matched in ba, or -1 if no match was found.
public final int indexIn(QByteArray ba,
int from)
pattern() that was set in the constructor or in the most recent call to setPattern(). Returns the position where the pattern() matched in ba, or -1 if no match was found.
public final QByteArray pattern()
setPattern().
public final void setPattern(QByteArray pattern)
pattern(), and indexIn().
public QByteArrayMatcher clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||