Skip to content

[java] Provide a raw getter method for bitmaps #893

Closed

Description

@LucaMerello

Exactly as it happens for enums, for which the decoder also provides a get method for the raw version of the data, for example:

 public byte exchangeCodeRaw ()
 {
     return buffer.getByte(offset + 18);
 }

 public ExchangeCode_enum exchangeCode ()
 {
     return ExchangeCode_enum.get(buffer.getByte(offset + 18));
 }

It would be useful to have the same raw information in the case of bitmaps. Now, to be able to get it, you need to have access to the buffer and the offset from outside the decoder and compose them as follows:

decoder.mMProtections().buffer().getByte(decoder.mMProtections().offset());

It would be easier and safer to get the same data in the following way:

byte bitmap = decoder.mMProtections().getRaw();

where MMProtections_setDecoder provides:

public byte getRaw()
{
    return buffer.getByte(offset);
}

Activity

  1. changed the title [-]Provide a raw getter method for bitmaps (java)[/-] [+][java] Provide a raw getter method for bitmaps[/+] on Mar 24, 2022
  2. tmontgomery commented on Mar 24, 2022

    @tmontgomery
    Contributor

    This seems useful. @mjpt777 @vyazelenko @mikeb01 what do you all think?

  3. mjpt777 commented on Mar 24, 2022

    @mjpt777
    Contributor

    I'd be fine with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions