~ubuntu-branches/ubuntu/oneiric/openjdk-7/oneiric-security

« back to all changes in this revision

Viewing changes to generated/java/nio/DirectLongBufferU.java

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-10-17 16:22:48 UTC
  • mfrom: (1.3.11) (8.1.25 quantal)
  • Revision ID: package-import@ubuntu.com-20121017162248-steblyv2lnk2t951
Tags: 7u9-2.3.3-0ubuntu1~11.10.1
Build IcedTea7 2.3.3 for oneiric.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
 
2
 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
3
3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
 *
5
5
 * This code is free software; you can redistribute it and/or modify it
6
6
 * under the terms of the GNU General Public License version 2 only, as
7
 
 * published by the Free Software Foundation.  Sun designates this
 
7
 * published by the Free Software Foundation.  Oracle designates this
8
8
 * particular file as subject to the "Classpath" exception as provided
9
 
 * by Sun in the LICENSE file that accompanied this code.
 
9
 * by Oracle in the LICENSE file that accompanied this code.
10
10
 *
11
11
 * This code is distributed in the hope that it will be useful, but WITHOUT
12
12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
18
 * 2 along with this work; if not, write to the Free Software Foundation,
19
19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
20
 *
21
 
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22
 
 * CA 95054 USA or visit www.sun.com if you need additional information or
23
 
 * have any questions.
 
21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 
22
 * or visit www.oracle.com if you need additional information or have any
 
23
 * questions.
24
24
 */
25
25
 
26
26
// -- This file was mechanically generated: Do not edit! -- //
27
27
 
28
28
package java.nio;
29
29
 
 
30
import java.io.FileDescriptor;
30
31
import sun.misc.Cleaner;
31
32
import sun.misc.Unsafe;
 
33
import sun.misc.VM;
32
34
import sun.nio.ch.DirectBuffer;
33
 
import sun.nio.ch.FileChannelImpl;
34
35
 
35
36
 
36
37
class DirectLongBufferU
57
58
    // NOTE: moved up to Buffer.java for speed in JNI GetDirectBufferAddress
58
59
    //    protected long address;
59
60
 
60
 
    // If this buffer is a view of another buffer then we keep a reference to
61
 
    // that buffer so that its memory isn't freed before we're done with it
62
 
    protected Object viewedBuffer = null;
 
61
    // An object attached to this buffer. If this buffer is a view of another
 
62
    // buffer then we use this field to keep a reference to that buffer to
 
63
    // ensure that its memory isn't freed before we are done with it.
 
64
    private final Object att;
63
65
 
64
 
    public Object viewedBuffer() {
65
 
        return viewedBuffer;
 
66
    public Object attachment() {
 
67
        return att;
66
68
    }
67
69
 
68
70
 
166
168
 
167
169
 
168
170
 
 
171
 
 
172
 
 
173
 
 
174
 
 
175
 
 
176
 
 
177
 
 
178
 
 
179
 
 
180
 
 
181
 
 
182
 
 
183
 
 
184
 
 
185
 
 
186
 
 
187
 
169
188
    // For duplicates and slices
170
189
    //
171
190
    DirectLongBufferU(DirectBuffer db,         // package-private
175
194
 
176
195
        super(mark, pos, lim, cap);
177
196
        address = db.address() + off;
178
 
        viewedBuffer = db;
179
 
 
180
 
 
181
 
 
 
197
 
 
198
 
 
199
 
 
200
        att = db;
182
201
 
183
202
 
184
203
 
365
384
        unsafe.copyMemory(ix(pos), ix(0), rem << 3);
366
385
        position(rem);
367
386
        limit(capacity());
368
 
        discardMark();
 
387
        discardMark();
369
388
        return this;
370
389
 
371
390
 
424
443
 
425
444
 
426
445
 
 
446
 
 
447
 
427
448
    public ByteOrder order() {
428
449
 
429
450