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

sbt.internal.inc.text.CompanionsFormat.scala Maven / Gradle / Ivy

/*
 * Zinc - The incremental compiler for Scala.
 * Copyright Scala Center, Lightbend, and Mark Harrah
 *
 * Licensed under Apache License 2.0
 * SPDX-License-Identifier: Apache-2.0
 *
 * See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.
 */

package sbt.internal.inc.text

import sbinary._
import xsbti.api._

object CompanionsFormat extends Format[Companions] {
  import java.io._
  def reads(in: Input): Companions = {
    val oin = new ObjectInputStream(new InputWrapperStream(in))
    try {
      oin.readObject.asInstanceOf[Companions]
    } finally {
      oin.close()
    }
  }
  def writes(out: Output, src: Companions): Unit = {
    val oout = new ObjectOutputStream(new OutputWrapperStream(out))
    try {
      oout.writeObject(src)
    } finally {
      oout.close()
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy