def put()

in bijection-core/src/main/scala/com/twitter/bijection/Bufferable.scala [34:43]


  def put(into: ByteBuffer, t: T): ByteBuffer
  def get(from: ByteBuffer): Try[(ByteBuffer, T)]

  /** Retrieve the value of get or throw an exception if the operation fails */
  def unsafeGet(from: ByteBuffer): (ByteBuffer, T) =
    get(from) match {
      case Success(tup @ _)                => tup
      case Failure(InversionFailure(_, t)) => throw t
      case Failure(t)                      => throw t
    }