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 4086254
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:42:00+00:00 2026-05-20T18:42:00+00:00

Before Java 1.4 it was common practice to work with files by moving bytes

  • 0

Before Java 1.4 it was common practice to work with files by moving bytes around between different InputStreams/OutputStreams.

Since Java 1.4, where NIO got added, it is suggested to use Channels to do the same.

With NIO2 in Java 7, there will be yet another API in java.nio.file which supports doing things like

val source = Paths.get("fooDir/fooFile.txt")
val target = Paths.get("barDir/barFile.txt")
source moveTo target
source createLinkTo target

Are the older ones more or less useless now for file system operations unless you want to touch bytes manually?

  • 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-20T18:42:01+00:00Added an answer on May 20, 2026 at 6:42 pm

    For most operations, NIO2 will let you do more / better.

    Some operations are just impossible using legacy APIs (some attributes, ACL, file change notifications, better error handling…).

    And best of all: this is not necessarily more difficult.

    To answer your question: when you could do some operations with two different APIs, I don’t see any use case where the old one would allow to do it better.

    There has been some discussion:

    Java NIO FileChannel versus FileOutputstream performance / usefulness
    http://mailinator.blogspot.com/2008/02/kill-myth-please-nio-is-not-faster-than.html

    But I’d say newest APIs are designed to be faster. If they don’t in some situation, expect a jvm update to restore the situation without having to change any code if you’ve been using the newer APIs.

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

Sidebar

Related Questions

In a world before Java 1.5 (so no enum ) and with my object
I've asked this before for Java , but this applies specifically to J2ME. Is
I have never connected to a database in java before. May I know if
I've never used Java AWT before and now I've got a piece of code
I never did any serious Java coding before, but I learned the syntax, libraries,
Before I start know this: I am extremely new to Java and programming. How
I've never done a Java Web start application before. I wrote my app's JNLP
I want to ask why java initializes the static objects before the non-static objects
I'm pretty new to Java and tried the Best Before puzzle from Spotify yesterday.
Using Linux environment with java,I'm having the config file which should be configured before

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.