class Field implements Comparable<Field> {

    public String read(ByteBuffer buffer)
    {
        byte[] bytes = new byte[this.length];
        buffer.position(this.start);
        buffer.get(bytes);
        String fieldValue = new String(bytes);
        if (!whitespaceSignificant || fieldValue.trim().isEmpty())
        {
            // Do not preserve whitespace
            fieldValue = fieldValue.trim();
        }
        log.debug("Read {}='{}'", this.id, fieldValue);
        return fieldValue;
    }

    public  Field(String id, Integer start, Integer length);
    public  Field(String id, Integer start, Integer length, boolean composite);
    public  Field(String id, Integer start, Integer length, boolean composite, boolean input, String alias);
    public  Field(String id, Integer start, Integer length, boolean composite, boolean input, String alias,
            boolean whitespace);

}