oneat
oneat

Reputation: 10994

Charset to save binary data

Is there charset which I could use to save 8bit data? I mean everything which is binary, without changing it content in string?

Upvotes: 1

Views: 274

Answers (2)

Cyrille Ka
Cyrille Ka

Reputation: 15533

The package java.io defines two kinds of classes to save data:

  • XXXOutputStream, which are for saving raw 8-bytes data
  • XXXWriter, which are for saving Strings

Just use the class from XXXOutputStream family that suits your needs. You don't need a Charset for that.

Upvotes: 4

pamphlet
pamphlet

Reputation: 2104

I think you are looking for the datatype byte[].

Upvotes: 0

Related Questions