src/Pure/General/bytes.scala
changeset 69464 ef051edd4d10
parent 69458 51e696887b81
child 71349 69a22ccd1817
equal deleted inserted replaced
69463:dcea1fffbfe6 69464:ef051edd4d10
    37       val b = new Array[Byte](length)
    37       val b = new Array[Byte](length)
    38       System.arraycopy(a, offset, b, 0, length)
    38       System.arraycopy(a, offset, b, 0, length)
    39       new Bytes(b, 0, b.length)
    39       new Bytes(b, 0, b.length)
    40     }
    40     }
    41 
    41 
       
    42   val newline: Bytes = apply("\n")
    42 
    43 
    43   def base64(s: String): Bytes =
    44   def base64(s: String): Bytes =
    44   {
    45   {
    45     val a = Base64.getDecoder.decode(s)
    46     val a = Base64.getDecoder.decode(s)
    46     new Bytes(a, 0, a.length)
    47     new Bytes(a, 0, a.length)