If i feed html files in the form of Array[Byte] at producer side in kafka then how to reconstruct html file at consumer side in kafka ?
This is how i am converting html files into Array[Byte]
def getByteArray(fileName: String): Array[Byte] =
{
val file: File = new File(fileName)
val fileinputstream: FileInputStream = new FileInputStream(file)
IOUtils.toByteArray(fileinputstream)
}
suggest me solution which will give the file back at consumer side by applying that function. e.g.
def byteArrayToFile(data:Array[Byte]):String={
//suggest
}