@@ -0,0 +1,2480 @@
+package com.blankstyle.vertx.php.parsetools;%0A%0Aimport org.vertx.java.core.buffer.Buffer;%0A%0Aimport com.blankstyle.vertx.php.Handler;%0Aimport com.blankstyle.vertx.php.util.PhpTypes;%0Aimport com.caucho.quercus.env.Env;%0Aimport com.caucho.quercus.env.NumberValue;%0Aimport com.caucho.quercus.env.Value;%0A%0A/**%0A * A PHP compatible implementation of the Vert.x RecordParser.%0A *%0A * @author Jordan Halterman%0A */%0Apublic class RecordParser %7B%0A%0A  private org.vertx.java.core.parsetools.RecordParser parser;%0A%0A  private RecordParser(org.vertx.java.core.parsetools.RecordParser parser) %7B%0A    this.parser = parser;%0A  %7D%0A%0A  private RecordParser(Env env, org.vertx.java.core.parsetools.RecordParser parser) %7B%0A    this.parser = parser;%0A  %7D%0A%0A  /**%0A   * Creates a new RecordParser in delimited mode.%0A   */%0A  public static RecordParser newDelimited(Env env, Value delim, Value handler) %7B%0A    PhpTypes.assertNotNull(env, delim);%0A    PhpTypes.assertCallable(env, handler, %22Handler argument to Vertx%5C%5CParseTools%5C%5CRecordParser::newDelimited() must be callable.%22);%0A    return new RecordParser(org.vertx.java.core.parsetools.RecordParser.newDelimited(delim.toString(), new Handler%3CBuffer%3E(env, PhpTypes.toCallable(handler))));%0A  %7D%0A%0A  /**%0A   * Creates a new RecordParser in fixed size mode.%0A   */%0A  public static RecordParser newFixed(Env env, NumberValue size, Value handler) %7B%0A    PhpTypes.assertNotNull(env, size);%0A    PhpTypes.assertCallable(env, handler, %22Handler argument to Vertx%5C%5CParseTools%5C%5CRecordParser::newFixed() must be callable.%22);%0A    return new RecordParser(org.vertx.java.core.parsetools.RecordParser.newFixed(size.toInt(), new Handler%3CBuffer%3E(env, PhpTypes.toCallable(handler))));%0A  %7D%0A%0A  /**%0A   * Sets the parser to fixed size mode.%0A   */%0A  public void fixedSizeMode(Env env, NumberValue size) %7B%0A    PhpTypes.assertNotNull(env, size);%0A    parser.fixedSizeMode(size.toInt());%0A  %7D%0A%0A  /**%0A   * Sets the parser to delimited mode.%0A   */%0A  public void delimitedMode(Env env, Value delim) %7B%0A    PhpTypes.assertNotNull(env, delim);%0A    parser.delimitedMode(delim.toString());%0A  %7D%0A%0A  /**%0A   * Feeds the parser with data.%0A   */%0A  public void handle(Buffer buffer) %7B%0A    parser.handle(buffer);%0A  %7D%0A%0A  /**%0A   * Sets the parser output handler.%0A   */%0A  public void setOutput(Env env, Value handler) %7B%0A    PhpTypes.assertCallable(env, handler, %22Handler argument to Vertx%5C%5CParseTools%5C%5CRecordParser::setOutput() must be callable.%22);%0A    parser.setOutput(new Handler%3CBuffer%3E(env, PhpTypes.toCallable(handler)));%0A  %7D%0A%0A%7D%0A

Add RecordParser implementation.