Skip to content

Commit

Permalink
Update ByteStringInputStream.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored May 20, 2024
1 parent 95db7e9 commit e883747
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.apache.pekko
import pekko.annotation.InternalApi
import pekko.util.ByteString
import pekko.util.ByteString.ByteString1C
import pekko.util.ByteString.ByteStrings

/** INTERNAL API */
@InternalApi
Expand All @@ -48,7 +49,7 @@ private[internal] object ByteStringInputStream {
case bytestrings: ByteStrings =>
new SequenceInputStream(bytestrings.iterator.map(_.asInputStream).asJavaEnumeration)
case _ =>
new ByteArrayInputStream(bs.toArrayUnsafe())
getInputStreamUnsafe(bs)
}

private def getInputStreamUnsafe(bs: ByteString): InputStream =
Expand Down

0 comments on commit e883747

Please sign in to comment.