public class

GenericArea

extends Object
java.lang.Object
   ↳ com.datalogic.extension.selfshopping.cradle.joyatouch.GenericArea
Known Direct Subclasses

Class Overview

Class representing a generic area of data, consisting in an array of bytes and its size.

Summary

Public Constructors
GenericArea()
Constructor for an empty area.
GenericArea(int size)
Constructor specifying the size of the internal byte array to create.
GenericArea(byte[] content)
Constructor that fills the area with the byte array given as input.
Public Methods
byte[] getContent()
Gets the content of this area.
int getSize()
Gets the area size.
void setContent(byte[] content)
Sets the content of this area.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GenericArea ()

Added in revision 1

Constructor for an empty area.

public GenericArea (int size)

Added in revision 1

Constructor specifying the size of the internal byte array to create.

Parameters
size The requested byte array size.
Throws
IllegalArgumentException in case the input size is invalid.

public GenericArea (byte[] content)

Added in revision 1

Constructor that fills the area with the byte array given as input.

Parameters
content The byte array that will represent the content of the new area. This array will be deep copied inside the class, any modification to the original array will not be reproduced inside the GenericArea object.
Throws
IllegalArgumentException in case the input array is invalid.

Public Methods

public byte[] getContent ()

Added in revision 1

Gets the content of this area.

Returns
  • byte[] the byte array representing the area content.

public int getSize ()

Added in revision 1

Gets the area size.

Returns
  • int the internal byte array length.

public void setContent (byte[] content)

Added in revision 1

Sets the content of this area.

Parameters
content The new byte array that will be deep copied inside the area, substituting the old one (if present).
Throws
IllegalArgumentException in case the input array is invalid.