Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can I use NIO?

 
daming wang
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody!
can someone tell me that if I can use NIO in my project.
my assignment is urlybird1.1.3,I want to use MappedByteBuffer and FileLock,these point all in package nio.
I found that someone said sun banned nio using?
what should I do?

thanks
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Daming,
I found that someone said sun banned nio using?

Could you be more precise, please? Who and where? It could help us replying if you gave us the links to the threads/posts you're referring to.
If you don't know how to include such links in your posts, it's explained here (UBB codes description).

Now about your question, it really depends on your own assignment: if NIO is not explicitly disallowed in your instructions, you can use it.

Regards,

Phil.
 
Anton Golovin
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by daming wang:
hello everybody!
can someone tell me that if I can use NIO in my project.
my assignment is urlybird1.1.3,I want to use MappedByteBuffer and FileLock,these point all in package nio.
I found that someone said sun banned nio using?
what should I do?

thanks


I think NIO is not necessary to complete the assignment so I am not using it. But that's just my personal opinion.
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This still appears on the Sun Certified Java Developer Site:

The following APIs and facilities may not be used:
# Enterprise JavaBeans
# Servlets, JSP technology, or any other web-oriented APIs
# NIO, the New IO facilities
# Java DataBase Connectivity (JDBC) and SQL
# Java IDL API and CORBA
# Third party software libraries or tools (such as browsers)
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that the thread "We are allowed to use NIO" clearly confirms what I wrote above: if NIO is not explicitly disallowed in your own instructions, you can use it.

Regards,

Phil.
 
daming wang
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maquet,because the class I want use in my project is MappedByteBuffer.It is os depent.some thread in the forum said it is prohibit.

Is it right?
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using MappedByteBuffer in your project is not a good idea indeed, for the reasons you explain yourself.
But it has nothing to do with the fact that NIO would be prohibited or not, depending on your detailed instructions. Check them carefully!

Regards,

Phil.

PS: Please call me Phil, next time.
 
daming wang
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you,phil!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic