Class AbstractByteArray

java.lang.Object
org.apache.mina.util.byteaccess.AbstractByteArray
All Implemented Interfaces:
ByteArray, IoAbsoluteReader, IoAbsoluteWriter
Direct Known Subclasses:
BufferByteArray, CompositeByteArray

abstract class AbstractByteArray extends Object implements ByteArray
Abstract class that implements ByteArray. This class will only be used internally and should not be used by end users.
  • Constructor Details

    • AbstractByteArray

      AbstractByteArray()
  • Method Details

    • length

      public final int length()
      Specified by:
      length in interface IoAbsoluteReader
      Returns:
      the total number of bytes that can be accessed.
    • hashCode

      public abstract int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object other)
      A ByteArray is equal to another ByteArray if they start and end at the same index, have the same byte order, and contain the same bytes at each index.
      Specified by:
      equals in interface ByteArray
      Overrides:
      equals in class Object
      Parameters:
      other - The ByteArray we want to compare with
      Returns:
      true if both ByteArray are equals