Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7175829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:22:59+00:00 2026-05-28T16:22:59+00:00

I have a file have multiple lines. For each line the format is String

  • 0

I have a file have multiple lines.

For each line the format is

"String A" "String B" "binary data"

What I want to do is adding “String C” in front of each line

"String C" "String A" "String B" "binary data"

Now I am using BufferedReader.readline(), it seems like this method has problem when reading binary data.

Can any one give me some suggestions on solving this question?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:23:00+00:00Added an answer on May 28, 2026 at 4:23 pm

    If you have binary data in your file you shouldn’t use the readLine() method which assumes that your line will end with ‘\r’,’\n’ or “\r\n”. The “binary data” can contain that sequence by chance and mess up your readLine().

    Generally speaking, you shouldn’t mix binary data with text data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a big log file with multiple lines separated by new line. Each
I have a file which contains multiple lines of this format: Item A 62.7
I have hierarchical data stored in an XML file. There are multiple companies, each
I have a CSV file. It has many lines. In each line there are
I have an XML file (on the left) and I want to create multiple
I have a 200kb file, what I use in multiple pages, but on each
I have multiple (8) WAR files and 1 EAR file that I want to
The problem I have is reading in multiple lines of integers from a file
I have a file that has over 200 lines in this format: name old_id
I have a file containing data in the format: 0.0 x1 0.1 x2 0.2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.