If none of the standard parsing strategies allow you to correctly parse data from the message buffer, use the example code in this topic to customize the field parser in a message definition.
// package declaration
package com.sybase.jtf.parser.api;
/**
* The ICustomParserField interface provides an extension point in which
* clients can develop custom code to define a means of parsing a field
* that is not defined in the standard API.
*/
public interface ICustomParserField {
/**
*
*
* @param buffer The message buffer.
* @param offset The offset into the buffer.
* @param max The maximum offset within the buffer.
* @param result The result of the parse.
* @param name The name of the component.
*
* @return The number of bytes consumed or -1 meaning failure.
*/
public int parseField(byte[] buffer, int offset, int max, ParseResult result, String name);
}
Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.