<class name="QByteArrayMatcher" doc="/** <p>The <a href="QByteArrayMatcher.html#QByteArrayMatcher(com.trolltech.qt.core.QByteArray)"><tt>QByteArrayMatcher</tt></a> class holds a sequence of bytes that can be quickly matched in a byte array.</p> <p>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 <a href="QByteArrayMatcher.html#indexIn(com.trolltech.qt.core.QByteArray, int)"><tt>indexIn</tt></a> is faster than matching a plain <a href="QByteArray.html"><tt>QByteArray</tt></a> with QByteArray::indexOf() if repeated matching takes place. This class offers no benefit if you are doing one-off byte array matches.</p> <p>Create the <a href="QByteArrayMatcher.html#QByteArrayMatcher(com.trolltech.qt.core.QByteArray)"><tt>QByteArrayMatcher</tt></a> with the <a href="QByteArray.html"><tt>QByteArray</tt></a> you want to search for. Then call <a href="QByteArrayMatcher.html#indexIn(com.trolltech.qt.core.QByteArray, int)"><tt>indexIn</tt></a> on the <a href="QByteArray.html"><tt>QByteArray</tt></a> that you want to search.</p> @see <a href="QByteArray.html"><tt>QByteArray</tt></a> @see <a href="QStringMatcher.html"><tt>QStringMatcher</tt></a> */"> <method name="public QByteArrayMatcher(com.trolltech.qt.core.QByteArrayMatcher other)" doc="/** <p>Copies the <tt>other</tt> byte array matcher to this byte array matcher.</p> */"/> <method name="public QByteArrayMatcher()" doc="/** <p>Constructs an empty byte array matcher that won't match anything. Call <a href="QByteArrayMatcher.html#setPattern(com.trolltech.qt.core.QByteArray)"><tt>setPattern</tt></a> to give it a pattern to match.</p> */"/> <method name="public QByteArrayMatcher(com.trolltech.qt.core.QByteArray pattern)" doc="/** <p>Constructs a byte array matcher that will search for <tt>pattern</tt>. Call <a href="QByteArrayMatcher.html#indexIn(com.trolltech.qt.core.QByteArray, int)"><tt>indexIn</tt></a> to perform a search.</p> */"/> <method name="public final int indexIn(com.trolltech.qt.core.QByteArray ba, int from)" doc="/** <p>Searches the byte array <tt>ba</tt>, from byte position <tt>from</tt> (default 0, i.e&#x2e; from the first byte), for the byte array <a href="QByteArrayMatcher.html#pattern()"><tt>pattern</tt></a> that was set in the constructor or in the most recent call to <a href="QByteArrayMatcher.html#setPattern(com.trolltech.qt.core.QByteArray)"><tt>setPattern</tt></a>. Returns the position where the <a href="QByteArrayMatcher.html#pattern()"><tt>pattern</tt></a> matched in <tt>ba</tt>, or -1 if no match was found.</p> */"/> <method name="public final int indexIn(com.trolltech.qt.core.QByteArray ba)" doc="/** <p>Equivalent to <a href="QByteArrayMatcher.html#indexIn(com.trolltech.qt.core.QByteArray, int)"><tt>indexIn</tt></a>(<tt>ba</tt>, 0). */"/> <method name="public final com.trolltech.qt.core.QByteArray pattern()" doc="/** <p>Returns the byte array pattern that this byte array matcher will search for.</p> @see <a href="QByteArrayMatcher.html#setPattern(com.trolltech.qt.core.QByteArray)"><tt>setPattern</tt></a> */"/> <method name="public final void setPattern(com.trolltech.qt.core.QByteArray pattern)" doc="/** <p>Sets the byte array that this byte array matcher will search for to <tt>pattern</tt>.</p> @see <a href="QByteArrayMatcher.html#pattern()"><tt>pattern</tt></a> @see <a href="QByteArrayMatcher.html#indexIn(com.trolltech.qt.core.QByteArray, int)"><tt>indexIn</tt></a> */"/> </class>