A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Java in General
Author
Adding binary chars to a String
Barry Brashear
Ranch Hand
Joined: Jun 05, 2001
Posts: 303
posted
Oct 11, 2004 15:54:00
0
How can I add the binary chars '0x02' to the beginning of a
String
and
'0x03' to the end?
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24056
13
I like...
posted
Oct 11, 2004 16:11:00
0
One way:
String s = "hello"; s = ((char) 2) + s + ((char) 3);
[Jess in Action]
[AskingGoodQuestions]
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Adding binary chars to a String
Similar Threads
I/O Eating Data
docx won't open
Help with parse string into object
Retrieving blob data in java
String to Binary?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter