Linked Questions
11 questions linked to/from Converting byte array to String (Java)
0
votes
0
answers
26
views
Java NIO server receives random string [duplicate]
I am trying to create a messaging system,but first I would like the code to be able to do the following:
Client sends a string
Server receives the string and echos it back to the client that sent it
...
381
votes
25
answers
982k
views
How to convert byte array to string and vice versa?
I have to convert a byte array to string in Android, but my byte array contains negative values.
If I convert that string again to byte array, values I am getting are different from original byte ...
52
votes
4
answers
31k
views
What is character encoding and why should I bother with it
I am quite confused about the concept of character encoding.
What is Unicode, GBK, etc? How does a programming language use them?
Do I need to bother knowing about them? Is there a simpler or faster ...
2
votes
1
answer
6k
views
Java - How to send byte array on Soap Request?
I was wondering if it is possible to send a byte[] over the Soap Request. Is it? If so, how can i do it using javax.xml.soap.*?
I only know how to do it sending strings.
private static SOAPMessage ...
-1
votes
1
answer
3k
views
parsing uploaded csv file with JSF ManagedBean
I have a maven web application in which I use JSF and spring. I want to parse a csv uploaded file with fileUploadListener. The file is uploaded, but I don't know how to get data from it and store it ...
0
votes
2
answers
1k
views
Interpret Java byte[] as a String
I have an array of bytes b:
b = [-98, -99]
I need to pass this segment of data to a function. The function takes a String (this is not changeable). How do I get Java to interpret the raw binary ...
-3
votes
1
answer
842
views
How to convert audio string back to audio bytes in java
Bytes of recorded audio was sent together with HTTP request body. When the request is received on the server side, the audio data looks like this:
\u0000\u0000\u0000\u0000\u0000\u0000��\u0002\u0000���...
1
vote
0
answers
343
views
Retrive image format from byte format : show null value
This is image of my data base as you can see here image insert successfully in byte format.
This structure of database
public void onCreate(SQLiteDatabase db) {
final String[] creatStatments = ...
1
vote
2
answers
237
views
Java storing type information along with Byte[] array from toBytes
I'm storing JSON information in a database, and I want to convert all values to bytes before storing, BUT retain type information.
So, for the types String, Integer, and Boolean, I want to be able to ...
0
votes
1
answer
128
views
Java serial reading program returns gibberish
I am attempting to read data from the serial port on my computer. It is connected to an arduino printing "hi" over and over. For some reason the program only returns gibberish. code:
import jssc....
0
votes
0
answers
128
views
UTF-8 encoding in Java giving contrasting result
I have the following encoding in the javascript file:
var words = CryptoJS.enc.Utf8.parse("cy03ISBnqOMGQZoAvpAszw==");
and it gives me out put as - (I have checked it on http://jsfiddle.net/9Hyfd/)
...