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

  • Home
  • SEARCH
  • 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 3459086
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:03:49+00:00 2026-05-18T10:03:49+00:00

I am trying to write a file line by line using apache FileUtils.writeLines() When

  • 0

I am trying to write a file line by line using apache FileUtils.writeLines()
When I try to open the file (notepad++, editplus) it is with no line breaks.
(I am sending null to the encoding)
thanks.

FileUtils.writeLines(new File(INDICES_AND_WEIGHTS_FILENAME), indicesAndWeightsParams.indicesParams,";");

where indicesParams is a list
public List indicesParams;

  • 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-18T10:03:50+00:00Added an answer on May 18, 2026 at 10:03 am

    Are you using code similar to this?

    List<String> ls = new ArrayList<String>();
    ls.add("aaa");
    ls.add("bbbbb");
    
    FileUtils.writeLines(new File("newfile.txt"), "UTF-8", ls);   // same effect as with "null" as encoding
    

    After this code, newFile.txt does have newlines.

    Using od -a newfile.txt generates (on Windows):

    0000000   a   a   a  cr  nl   b   b   b   b   b  cr  nl
    0000014
    

    which shows that newlines really do exist.

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

Sidebar

Related Questions

I am trying to write a file in android using phonegap cordova 1.5.0. Below
I'm trying to write a multi-file patch for an open-source project, but the master
I'm trying to write an INI file using the WritePrivateProfileString and WritePrivateProfileStruct functions. I
I'm trying to write an xml file with utf-8 encoded data using ElementTree like
I'm trying to write a piece of code that reads a file line by
I'm currently trying to write a multiple-file Python (2.6.5) game using PyGame. The problem
I'm trying to write a simple command line audio player using the Python Gstreamer
I'm trying to write a cell array and I'm using these line of codes:
I’m trying to write a twitter program to get my tinme line. I’m using
I'm trying to write line into a file at line-position n. Even if line

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.