9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 * @bug 4434723 4482726 4559072 4795550 5081340 5103988 6984545
26 * @summary Test FileChannel.transferFrom and transferTo (use -Dseed=X to set PRNG seed)
27 * @library ..
28 * @library /test/lib
29 * @run testng/timeout=300 Transfer
30 * @key randomness
31 */
32
33 import java.io.BufferedReader;
34 import java.io.File;
35 import java.io.FileInputStream;
36 import java.io.FileOutputStream;
37 import java.io.InputStreamReader;
38 import java.io.IOException;
39 import java.io.RandomAccessFile;
40 import java.io.Reader;
41 import java.net.InetAddress;
42 import java.net.InetSocketAddress;
43 import java.nio.ByteBuffer;
44 import java.nio.channels.FileChannel;
45 import java.nio.channels.NonReadableChannelException;
46 import java.nio.channels.Pipe;
47 import java.nio.channels.ServerSocketChannel;
48 import java.nio.channels.SocketChannel;
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 * @bug 4434723 4482726 4559072 4795550 5081340 5103988 6984545
26 * @summary Test FileChannel.transferFrom and transferTo (use -Dseed=X to set PRNG seed)
27 * @library ..
28 * @library /test/lib
29 * @build jdk.test.lib.RandomFactory
30 * @run testng/timeout=300 Transfer
31 * @key randomness
32 */
33
34 import java.io.BufferedReader;
35 import java.io.File;
36 import java.io.FileInputStream;
37 import java.io.FileOutputStream;
38 import java.io.InputStreamReader;
39 import java.io.IOException;
40 import java.io.RandomAccessFile;
41 import java.io.Reader;
42 import java.net.InetAddress;
43 import java.net.InetSocketAddress;
44 import java.nio.ByteBuffer;
45 import java.nio.channels.FileChannel;
46 import java.nio.channels.NonReadableChannelException;
47 import java.nio.channels.Pipe;
48 import java.nio.channels.ServerSocketChannel;
49 import java.nio.channels.SocketChannel;
|