title: How to get Data type from Byte Array in Java
body: <p>I have a Java app that lets users to store the data in database but  while storing I store those data as byte array which is same as cassandra, Now when I get back the byte array I want to convert those data as User saved, means if user saved as Long I want to show long value, or if User saved String I want to show String value. Now If I converts all the bytes array fields to string, apparently long bytes array will be shown as wild char.string fields would be fine.</p>
  
  <p>Please suggest me how to solve this issue in java. Its similar to cassandra way of storing data.cassandra store all the data as byte array.</p>
  
  <p>Basically I want to know the datatype of the byte array.</p>