com.jdroid.java.http.okhttp.ParseCommand.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdroid-java-http-okhttp Show documentation
Show all versions of jdroid-java-http-okhttp Show documentation
OKHttp Http Layer Implementation for Jdroid
The newest version!
package com.jdroid.java.http.okhttp
import com.jdroid.java.exception.UnexpectedException
import com.jdroid.java.http.parser.Parser
import java.io.IOException
import java.io.InputStream
class ParseCommand(private val parser: Parser) : OkHttpCommand() {
@Throws(IOException::class)
override fun doExecute(inputStream: InputStream): Any? {
try {
return parser.parse(inputStream)
} catch (e: UnexpectedException) {
val throwable = e.cause
if (throwable is IOException) {
throw throwable
} else {
throw e
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy