This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun Bundle.toContentString(): String { | |
val builder = StringBuilder("Extras:\n") | |
for (key in keySet()) { | |
val value = get(key) | |
builder.append(key).append(": ").append(value).append("\n") | |
} | |
return builder.toString() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.* | |
/** | |
* Returns an empty string if something goes wrong internally | |
*/ | |
fun serializableToString(item : Serializable) : String { | |
var result = "" | |
try { | |
val stream = ByteArrayOutputStream() |