I need to read file stream as bits and then I should be able to write bits to file again. Are there any classes for this purpose?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I know, there is no built in way to do it directly at the bit level. There are ways to read/write byte by byte using the built in streams. You could write a wrapper on a stream that looks like it reads and writes bits.
If you want something that is already written, look for open source projects that do certain kinds of audio or video encoding, since there are things like that. For instance, the FLAC codec had a BitInputStream that might meet your needs.