Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Unicode file to byte array?

Posted on 2005-02-26
3
Medium Priority
?
317 Views
Last Modified: 2010-03-31
Hey all.

My application will need to, at some point, read a file into a byte array, for processing. However, if this file is in Unicode format, will that prevent me from being able to read it into a byte array??

Any possible workarounds?

Cheers,
>> IM
0
Comment
Question by:InteractiveMind
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 13409704
that won't stop you, you can read any file regardless of format into a byte array

http://www.javaalmanac.com/egs/java.io/File2ByteArray.html
0
 
LVL 92

Expert Comment

by:objects
ID: 13409706
As Java's String class supports Unicode you can also read it as a text file

http://www.javaalmanac.com/egs/java.io/ReadLinesFromFile.html
0
 
LVL 25

Author Comment

by:InteractiveMind
ID: 13409743
Cheers, Mick.
>> IM
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month13 days, 3 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question