1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.mojo.system;
7 import java.nio.ByteBuffer;
10 * Implementation of {@link SharedBufferHandle}.
12 class SharedBufferHandleImpl extends HandleImpl implements SharedBufferHandle {
15 * @see HandleImpl#HandleImpl(CoreImpl, int)
17 SharedBufferHandleImpl(CoreImpl core, int mojoHandle) {
18 super(core, mojoHandle);
22 * @see HandleImpl#HandleImpl(UntypedHandleImpl)
24 SharedBufferHandleImpl(UntypedHandleImpl handle) {
29 * @see SharedBufferHandle#duplicate(DuplicateOptions)
32 public SharedBufferHandle duplicate(DuplicateOptions options) {
33 return mCore.duplicate(this, options);
37 * @see SharedBufferHandle#map(long, long, MapFlags)
40 public ByteBuffer map(long offset, long numBytes, MapFlags flags) {
41 return mCore.map(this, offset, numBytes, flags);
45 * @see SharedBufferHandle#unmap(ByteBuffer)
48 public void unmap(ByteBuffer buffer) {