class Field implements Comparable<Field> {

    protected byte[] getBytes(Object value)
    {
        // Allocate result array
        byte[] bytes = new byte[this.length];
        // Fill with blanks
        Arrays.fill(bytes, (byte) ' ');
        // Set value or null
        String stringValue = value == null ? null : value.toString();
        if (stringValue != null && !stringValue.equals(""))
        {
            // Value is not null and not the empty string: copy over values to
            // result
            byte[] valueBytes = value.toString().getBytes();
            // Make sure not to copy more bytes than exist in the dest array
            int numberToCopy = valueBytes.length > this.length ? this.length : valueBytes.length;
            // Copy to result
            System.arraycopy(valueBytes, 0, bytes, 0, numberToCopy);
        }
        return bytes;
    }

    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);

}