PackEmitter

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.core.parser.JFlex
Class PackEmitter

    java.lang.Object
      weka.core.parser.JFlex.PackEmitter

Direct Known Subclasses:
  CountEmitter, HiLowEmitter

    public abstract class PackEmitter

extends java.lang.Object

Encodes `int` arrays as strings. Also splits up strings when longer than 64K in UTF8 encoding. Subclasses emit unpacking code. Usage protocol: `p.emitInit();`
`for each data: p.emitData(data);`
`p.emitUnpack();`

Version:
  $Revision: 1.1 $, $Date: 2008-05-09 09:14:10 $
Author:
  Gerwin Klein

Constructor Summary
`PackEmitter(java.lang.String name)` Create new emitter for an array.

Method Summary
`void` | `breaks()` Execute line/chunk break if necessary.
`void` | `emitInit()` Emit declaration of decoded member and open first chunk.
`void` | `emitUC(int i)` Emit single unicode character.
`abstract void` | `emitUnpack()` Emit the unpacking code.
`java.lang.String` | `toString()` Return current output buffer.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PackEmitter

    public PackEmitter(java.lang.String name)

  Create new emitter for an array.

  Parameters:
    `name` - the name of the generated array

Method Detail

### toString

    public java.lang.String toString()

  Return current output buffer.

  Overrides:
    `toString` in class `java.lang.Object`

### emitInit

    public void emitInit()

  Emit declaration of decoded member and open first chunk.

### emitUC

    public void emitUC(int i)

  Emit single unicode character. Updates length, position, etc.

  Parameters:
    `i` - the character to emit.

### breaks

    public void breaks()

  Execute line/chunk break if necessary. Leave space for at least two chars.

### emitUnpack

    public abstract void emitUnpack()

  Emit the unpacking code.

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD