Skip to content

Commit

Permalink
fix: write using buffered output
Browse files Browse the repository at this point in the history
  • Loading branch information
betarixm committed Nov 27, 2023
1 parent 13484e9 commit d95717b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/Block.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Block(val records: LazyList[Record]) extends AnyVal {

def writeTo(path: Path): File = {
val file = File(path)
val writer = file.bufferedWriter()
val writer = file.bufferedOutput()

try {
toChars.foreach(writer.write(_))
Expand All @@ -65,7 +65,7 @@ class Block(val records: LazyList[Record]) extends AnyVal {
.zipWithIndex
.map({ case (records, index) =>
val file = File(directory / s"partition.$index")
val writer = file.bufferedWriter()
val writer = file.bufferedOutput()

try {
records.foreach(_.toChars.foreach(writer.write(_)))
Expand Down

0 comments on commit d95717b

Please sign in to comment.