Skip to content

Commit

Permalink
[query] Remove read/writeUTF from Input/OutputBuffer (#14401)
Browse files Browse the repository at this point in the history
It's dead code.
  • Loading branch information
chrisvittal authored Mar 8, 2024
1 parent 923cc55 commit 950ce28
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
11 changes: 0 additions & 11 deletions hail/src/main/scala/is/hail/io/InputBuffers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ trait InputBuffer extends Closeable {
def readDoubles(to: Array[Double]): Unit = readDoubles(to, 0, to.length)

def readBoolean(): Boolean = readByte() != 0

def readUTF(): String = {
val n = readInt()
val a = readBytesArray(n)
new String(a, utfCharset)
}
}

trait InputBlockBuffer extends Spec with Closeable {
Expand Down Expand Up @@ -354,11 +348,6 @@ final class TracingInputBuffer(

override def readBoolean(): Boolean = readByte() != 0

override def readUTF(): String = {
val s = in.readUTF()
logfile.write(s.getBytes(utfCharset))
s
}
}

final class BlockingInputBuffer(blockSize: Int, in: InputBlockBuffer) extends InputBuffer {
Expand Down
6 changes: 0 additions & 6 deletions hail/src/main/scala/is/hail/io/OutputBuffers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ trait OutputBuffer extends Closeable {

def writeBoolean(b: Boolean): Unit =
writeByte(b.toByte)

def writeUTF(s: String): Unit = {
val bytes = s.getBytes(utfCharset)
writeInt(bytes.length)
write(bytes)
}
}

trait OutputBlockBuffer extends Spec with Closeable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ class RichCodeInputBuffer(
def readBoolean(): Code[Boolean] =
ib.invoke[Boolean]("readBoolean")

def readUTF(): Code[String] =
ib.invoke[String]("readUTF")

def readBytes(toRegion: Value[Region], toOff: Code[Long], n: Int): Code[Unit] = {
if (n == 0)
Code._empty
Expand Down

0 comments on commit 950ce28

Please sign in to comment.