| Author |
java.nio.ByteBuffer?
|
Elchin Asgarli
Ranch Hand
Joined: Mar 08, 2010
Posts: 222
|
|
Is it allowed to use java.nio.ByteBuffer? Did anyone who passed use it?
The Oracle webpage says that you have to use Standard file IO (java.io, not java.nio), and it also says NIO, the New IO facilities cannot be used.
But I am not using ByteBuffer for file I/O operations, I even wonder why is ByteBuffer in NIO package. I want to use it to buffer data before writing to database file.
|
Personal page, SCJP 6 with 91%, SCWCD 5 with 84%, OCMJD
|
 |
Roel De Nijs
Bartender
Joined: Jul 19, 2004
Posts: 4349
|
|
|
I just used a byte[] to write everything to file, using a RandomAccessFile
|
SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
|
 |
Roberto Perillo
Bartender
Joined: Dec 28, 2007
Posts: 2212
|
|
|
Well champ, I'd say that, for whatever you are using it, you are not allowed to do so.
|
Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
|
 |
Elchin Asgarli
Ranch Hand
Joined: Mar 08, 2010
Posts: 222
|
|
Thanks for the answers!
I used byte[], Strinng.getBytes(), System.arraycopy() and Arrays.fill()
|
 |
 |
|
|
subject: java.nio.ByteBuffer?
|
|
|