+act adds missing java api for byte string
This commit is contained in:
parent
c8795b62fa
commit
4da2593de5
1 changed files with 9 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ package akka.util
|
|||
import java.nio.{ ByteBuffer, ByteOrder }
|
||||
import java.lang.{ Iterable ⇒ JIterable }
|
||||
|
||||
import scala.annotation.varargs
|
||||
import scala.collection.IndexedSeqOptimized
|
||||
import scala.collection.mutable.{ Builder, WrappedArray }
|
||||
import scala.collection.immutable
|
||||
|
|
@ -59,6 +60,14 @@ object ByteString {
|
|||
def fromArray(array: Array[Byte], offset: Int, length: Int): ByteString =
|
||||
CompactByteString.fromArray(array, offset, length)
|
||||
|
||||
/**
|
||||
* JAVA API
|
||||
* Creates a new ByteString by copying an int array by converting from integral numbers to bytes.
|
||||
*/
|
||||
@varargs
|
||||
def fromInts(array: Int*): ByteString =
|
||||
apply(array:_*)(scala.math.Numeric.IntIsIntegral)
|
||||
|
||||
/**
|
||||
* Creates a new ByteString which will contain the UTF-8 representation of the given String
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue