0

Anyone know how can I read any file in binary using Java? I want to be able to read any image, document, pdf etc as a stream of binary digits. Thanks

2 Answers 2

3

Sounds like you want FileInputStream! You may find the Basic I/O tutorial useful too.

Sign up to request clarification or add additional context in comments.

Comments

1

use FileInputStream

FileInputStream is meant for reading streams of raw bytes such as image data. For reading streams of characters, consider using FileReader.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.