diff --git a/README.md b/README.md index a6bc96b..d2bd3b9 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ If you are interested in the translation and want to look at how it works, it wi - [ ] Unit Tests - [ ] Documentation 1. [ ] Class WechatyPuppetHostie - - TS SLOC(909): + - TS SLOC(909): - [x] Code - [ ] Unit Tests - [ ] Documentation @@ -278,7 +278,7 @@ Java(Kotlin) Wechaty **BETA** Released! Read more from our Multi-language Wechaty Beta Release event from our blog: -- [Multi Language Wechaty Beta Release Announcement!](https://wechaty.github.io/2020/06/19/multi-language-wechaty-beta-release/) +- [Multi Language Wechaty Beta Release Announcement!](https://wechaty.js.org/2020/06/19/multi-language-wechaty-beta-release/) ### v0.1.4 (June 13 2020) 1. use `PuppetManager` to manage multi puppet implementations. @@ -323,6 +323,10 @@ We decided to use Kotlin to develop the Java Wechaty! - [Java Wechaty](https://github.com/wechaty/java-wechaty) - Java WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Java) - [Scala Wechaty](https://github.com/wechaty/scala-wechaty) - Scala WeChaty Conversational AI Chatbot SDK for WechatyIndividual Accounts (Scala) +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/wechaty/java-wechaty.svg)](https://starchart.cc/wechaty/java-wechaty) + ## Badge [![Wechaty in Kotlin](https://img.shields.io/badge/Wechaty-Kotlin-orange)](https://github.com/wechaty/java-wechaty) diff --git a/pom.xml b/pom.xml index 59edf86..05f8401 100644 --- a/pom.xml +++ b/pom.xml @@ -180,6 +180,25 @@ + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + + generate-sources + + add-source + + + + src/main/kotlin + + + + + diff --git a/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt b/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt index 31f9857..904e8ef 100644 --- a/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt +++ b/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt @@ -138,13 +138,13 @@ class FileBox(options: FileBoxOptions) { } fun toJsonString(): String { - buffer = toByte(this) + buffer = getBufferByte(this) return JsonUtils.write(this) } - fun toByte(fileBox: FileBox): ByteArray? { + private fun getBufferByte(fileBox: FileBox): ByteArray? { when (fileBox.type()) { FileBoxType.File -> { @@ -153,11 +153,12 @@ class FileBox(options: FileBoxOptions) { return FileUtils.readFileToByteArray(file) } - FileBoxType.Url -> { return null; } - + FileBoxType.Base64 -> { + return null; + } else -> { TODO() }