Make ByteArray.inputStream a method, not a property.

#KT-8360 Fixed
This commit is contained in:
Ilya Gorbunov
2015-07-03 19:09:52 +03:00
parent 4de5dd9aeb
commit 8b325e8a30
2 changed files with 9 additions and 3 deletions
@@ -52,12 +52,18 @@ import kotlin.jvm.internal.Intrinsic
*/
@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.
*/
public val ByteArray.inputStream : ByteArrayInputStream
get() = ByteArrayInputStream(this)
public fun ByteArray.inputStream(): ByteArrayInputStream = ByteArrayInputStream(this)
/**
* Creates an input stream for reading data from the specified portion of this byte array.