All Downloads are FREE. Search and download functionalities are using the official Maven repository.

replpp.shaded.geny.Bytes.scala Maven / Gradle / Ivy

There is a newer version: 0.1.98
Show newest version
package replpp.shaded
package geny

/**
 * Trivial wrapper around `Array[Byte]` with sane equality and useful toString
 */
class Bytes(val array: Array[Byte]){
  override def equals(other: Any) = other match{
    case otherBytes: Bytes => java.util.Arrays.equals(array, otherBytes.array)
    case _ => false
  }
  override def toString = new String(array, java.nio.charset.StandardCharsets.UTF_8)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy