Class Binary

java.lang.Object
ch.ivyteam.ivy.scripting.objects.Binary
All Implemented Interfaces:
IIvyDataObject, Serializable, Cloneable

public final class Binary extends Object implements IIvyDataObject
A Binary objects is a wrapper object for a byte array.
See Also:
API:
This is a public API.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a clone of this object.
    boolean
    equals(Object anObject)
     
    byte
    getByte(int index)
    Returns the value of a byte at a given position.
    int
     
    int
    Returns the number of bytes of this object.
    byte[]
    Gets the bytes
     
  • Method Details

    • length

      public int length()
      Returns the number of bytes of this object.
      Returns:
      The number of bytes of this object.
      API:
      This public API is available in Java.
    • getByte

      public byte getByte(int index)
      Returns the value of a byte at a given position.
      Parameters:
      index - The index of the requested byte.
      Returns:
      The byte with given index.
      API:
      This public API is available in Java.
    • equals

      public boolean equals(Object anObject)
      See Also:
      API:
      This public API is available in Java.
    • hashCode

      public int hashCode()
      See Also:
      API:
      This public API is available in Java.
    • toString

      public String toString()
      See Also:
      API:
      This public API is available in Java.
    • toByteArray

      public byte[] toByteArray()
      Gets the bytes
      Returns:
      the byte array; This instance is a clone from the wrapped byte array.
      API:
      This public API is available in Java.
    • clone

      public Binary clone()
      Creates a clone of this object.
      Specified by:
      clone in interface IIvyDataObject
      Returns:
      A shallow clone.
      API:
      This public API is available in Java.