pjfanning commented on code in PR #1085:
URL: https://github.com/apache/incubator-pekko/pull/1085#discussion_r1472645237


##########
actor/src/main/scala-2.12/org/apache/pekko/util/ByteString.scala:
##########
@@ -827,6 +827,15 @@ sealed abstract class ByteString extends IndexedSeq[Byte] 
with IndexedSeqOptimiz
    */
   def toArrayUnsafe(): Array[Byte] = toArray
 
+  /**
+   * Return the bytes in this ByteString as an InputStream.
+   *
+   * @return the bytes in this ByteString accessible as an InputStream
+   * @see [[asByteBuffer]]
+   * @since 1.1.0
+   */
+  final def asInputStream: InputStream = new 
ByteArrayInputStream(toArrayUnsafe())

Review Comment:
   good point - I have committed a change based on @jtjeferreira's suggestions



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to