Make ByteArray.inputStream a method, not a property.
#KT-8360 Fixed
This commit is contained in:
@@ -52,12 +52,18 @@ import kotlin.jvm.internal.Intrinsic
|
|||||||
*/
|
*/
|
||||||
@Intrinsic("kotlin.arrays.array") public fun booleanArrayOf(vararg content : Boolean) : BooleanArray = content
|
@Intrinsic("kotlin.arrays.array") public fun booleanArrayOf(vararg content : Boolean) : BooleanArray = content
|
||||||
|
|
||||||
|
// TODO: Move inputStream to kotlin.io
|
||||||
|
/**
|
||||||
|
* Creates an input stream for reading data from this byte array.
|
||||||
|
*/
|
||||||
|
deprecated("Use inputStream() method instead.", ReplaceWith("this.inputStream()"))
|
||||||
|
public val ByteArray.inputStream : ByteArrayInputStream
|
||||||
|
get() = inputStream()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an input stream for reading data from this byte array.
|
* Creates an input stream for reading data from this byte array.
|
||||||
*/
|
*/
|
||||||
public val ByteArray.inputStream : ByteArrayInputStream
|
public fun ByteArray.inputStream(): ByteArrayInputStream = ByteArrayInputStream(this)
|
||||||
get() = ByteArrayInputStream(this)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an input stream for reading data from the specified portion of this byte array.
|
* Creates an input stream for reading data from the specified portion of this byte array.
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class OldStdlibTest() {
|
|||||||
x [index] = index.toByte()
|
x [index] = index.toByte()
|
||||||
}
|
}
|
||||||
|
|
||||||
for(b in x.inputStream) {
|
for(b in x.inputStream()) {
|
||||||
println(b)
|
println(b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user