当前位置: 首页>>代码示例>>Java>>正文


Java VM.getData方法代码示例

本文整理汇总了Java中com.sun.squawk.VM.getData方法的典型用法代码示例。如果您正苦于以下问题:Java VM.getData方法的具体用法?Java VM.getData怎么用?Java VM.getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.squawk.VM的用法示例。


在下文中一共展示了VM.getData方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBytes

import com.sun.squawk.VM; //导入方法依赖的package包/类
/**
 * Gets <code>number</code> bytes starting at the given offset in the memory area
 *  associated with this object and assigns
 * them to the byte array passed starting at position <code>low</code>.
 *  Each byte is loaded from memory in a single atomic operation.  Groups of bytes
 *  may be loaded together, but this is unspecified.
 * <p>
 *  Caching of the memory access is controlled by the memory <code>type</code> requested
 *  when the <code>RawMemoryAccess</code> instance was created.  If the memory is not cached,
 *  this method guarantees serialized access (that is, the memory access at the memory
 *  occurs in the same order as in the program.  Multiple writes to the same location
 *  may not be coalesced.)
 *
 * @param offset The offset in bytes from the beginning of the raw memory from which to start loading.
 *
 * @param bytes The array into which the loaded items are placed.
 *
 * @param low The offset which is the starting point in the given array for the
 *            loaded items to be placed.
 *
 * @param number The number of items to load.
 *
 * @throws OffsetOutOfBoundsException Thrown if the offset is negative or greater than the size of the
 *      raw memory area.  The role of the {@link SizeOutOfBoundsException} somewhat overlaps
 *      this exception since it is thrown if the offset is within the object but outside the
 *      mapped area. (See {@link RawMemoryAccess#map(long base, long size)}).
 *
 * @throws SizeOutOfBoundsException  Thrown if the object is not mapped,
 *      or if the byte falls in an invalid address range.  This is checked at every
 *      entry in the array to allow for the possibility that the memory area
 *      could be unmapped or remapped.  The <code>bytes</code> array could, therefore, be
 *      partially updated if the raw memory is unmapped or remapped mid-method.
 *
 * @throws ArrayIndexOutOfBoundsException Thrown if <code>low</code> is less than 0 or greater
 * 		than <code>bytes.length - 1</code>, or if <code>low + number</code> is greater than or
 * 		equal to <code>bytes.length</code>.
 *
 * @throws java.lang.SecurityException Thrown if this access is
 * not permitted by the security manager.
 *
 */
public void getBytes(long offset, byte[] bytes, int low, int number) {
    int off = (int)offset;
    checkMultiRead(off, number, 1);
    VM.getData(vbase, off, bytes, low, number, 1);
}
 
开发者ID:tomatsu,项目名称:squawk,代码行数:47,代码来源:RawMemoryAccess.java

示例2: getInts

import com.sun.squawk.VM; //导入方法依赖的package包/类
/**
 * Gets <code>number</code> integers starting at the given offset in the memory area
 *  associated with this object and assign
 * them to the int array passed starting at position <code>low</code>.
 * <p>
 *  If the integers are aligned on natural boundaries
 *  each integer is loaded from memory in a single atomic operation.  Groups of integers
 *  may be loaded together, but this is unspecified.
 *<p>
 *  If the integers are not aligned on natural boundaries they may not be loaded atomically and
 *  the number and order of load operations is unspecified.
 * <p>
 *  Caching of the memory access is controlled by the memory <code>type</code> requested
 *  when the <code>RawMemoryAccess</code> instance was created.  If the memory is not cached,
 *  this method guarantees serialized access (that is, the memory access at the memory
 *  occurs in the same order as in the program.  Multiple writes to the same location
 *  may not be coalesced.)
 *
 * @param offset The offset in bytes from the beginning of the raw memory area
 *      at which to start loading.
 *
 * @param ints The array into which the integers read from the raw memory are placed.
 *
 * @param low The offset which is the starting point in the given array for the
 *            loaded items to be placed.
 *
 * @param number The number of integers to loaded.
 *
 * @throws OffsetOutOfBoundsException Thrown if the offset is negative or greater than the size of the
 *      raw memory area.  The role of the {@link SizeOutOfBoundsException} somewhat overlaps
 *      this exception since it is thrown if the offset is within the object but outside the
 *      mapped area. (See {@link RawMemoryAccess#map(long base, long size)}).
 *
 * @throws SizeOutOfBoundsException Thrown if the object is not mapped,
 *      or if the integers fall in an invalid address range.  This is checked at every
 *      entry in the array to allow for the possibility that the memory area
 *      could be unmapped or remapped.  The <code>ints</code> array could, therefore, be
 *      partially updated if the raw memory is unmapped or remapped mid-method.
 *
 * @throws ArrayIndexOutOfBoundsException Thrown if <code>low</code> is less than 0 or greater
 * 		than <code>bytes.length - 1</code>, or if <code>low + number</code> is greater than or
 * 		equal to <code>bytes.length</code>.
 *
 * @throws java.lang.SecurityException Thrown if this access is
 * not permitted by the security manager.
 */
public void getInts(long offset, int[] ints, int low, int number) {
    int off = (int)offset;
    checkMultiRead(off, number, 4);
    VM.getData(vbase, off, ints, low, number, 4);
}
 
开发者ID:tomatsu,项目名称:squawk,代码行数:52,代码来源:RawMemoryAccess.java

示例3: getLongs

import com.sun.squawk.VM; //导入方法依赖的package包/类
/**
 * Gets <code>number</code> longs starting at the given offset in the memory area
 *  associated with this object and assign
 * them to the long array passed starting at position <code>low</code>.
 * <p>
 *  The loads are not required to be atomic even if they are located on natural boundaries.
 * <p>
 *  Caching of the memory access is controlled by the memory <code>type</code> requested
 *  when the <code>RawMemoryAccess</code> instance was created.  If the memory is not cached,
 *  this method guarantees serialized access (that is, the memory access at the memory
 *  occurs in the same order as in the program.  Multiple writes to the same location
 *  may not be coalesced.)
 *
 * @param offset The offset in bytes from the beginning of the raw memory area
 *      at which to start loading.
 *
 * @param longs The array into which the loaded items are placed.
 *
 * @param low The offset which is the starting point in the given array for the
 *            loaded items to be placed.
 *
 * @param number The number of longs to load.
 *
 * @throws OffsetOutOfBoundsException Thrown if the offset is negative or greater than the size of the
 *      raw memory area.  The role of the {@link SizeOutOfBoundsException} somewhat overlaps
 *      this exception since it is thrown if the offset is within the object but outside the
 *      mapped area. (See {@link RawMemoryAccess#map(long base, long size)}).
 *
 * @throws SizeOutOfBoundsException Thrown if the object is not mapped,
 *      or if a long falls in an invalid address range.  This is checked at every
 *      entry in the array to allow for the possibility that the memory area
 *      could be unmapped or remapped.  The <code>longs</code> array could, therefore, be
 *      partially updated if the raw memory is unmapped or remapped mid-method.
 *
 * @throws ArrayIndexOutOfBoundsException Thrown if <code>low</code> is less than 0 or greater
 * 		than <code>bytes.length - 1</code>, or if <code>low + number</code> is greater than or
 * 		equal to <code>bytes.length</code>.
 *
 * @throws java.lang.SecurityException Thrown if this access is
 * not permitted by the security manager.
 */
public void getLongs(long offset, long[] longs, int low, int number) {
    int off = (int)offset;
    checkMultiRead(off, number, 8);
    VM.getData(vbase, off, longs, low, number, 4);
}
 
开发者ID:tomatsu,项目名称:squawk,代码行数:47,代码来源:RawMemoryAccess.java

示例4: getShorts

import com.sun.squawk.VM; //导入方法依赖的package包/类
/**
 * Gets <code>number</code> shorts starting at the given offset in the memory area
 *  associated with this object and assign
 * them to the short array passed starting at position <code>low</code>.
 * <p>
 *  If the shorts are located on natural boundaries
 *  each short is loaded from memory in a single atomic operation.  Groups of shorts
 *  may be loaded together, but this is unspecified.
 *  <p>
 *  If the shorts are not located on natural boundaries the load may not be atomic, and
 *  the number and order of load
 *  operations is unspecified.
 * <p>
 *  Caching of the memory access is controlled by the memory <code>type</code> requested
 *  when the <code>RawMemoryAccess</code> instance was created.  If the memory is not cached,
 *  this method guarantees serialized access (that is, the memory access at the memory
 *  occurs in the same order as in the program.  Multiple writes to the same location
 *  may not be coalesced.)
 *
 * @param offset The offset in bytes from the beginning of the raw memory area
 *       from which to start loading.
 *
 * @param shorts The array into which the loaded items are placed.
 *
 * @param low The offset which is the starting point in the given array for the
 *            loaded shorts to be placed.
 *
 * @param number The number of shorts to load.
 *
 * @throws OffsetOutOfBoundsException Thrown if the offset is negative or greater than the size of the
 *      raw memory area.  The role of the {@link SizeOutOfBoundsException} somewhat overlaps
 *      this exception since it is thrown if the offset is within the object but outside the
 *      mapped area. (See {@link RawMemoryAccess#map(long base, long size)}).
 *
 * @throws SizeOutOfBoundsException  Thrown if the object is not mapped,
 *      or if a short falls in an invalid address range.  This is checked at every
 *      entry in the array to allow for the possibility that the memory area
 *      could be unmapped or remapped.  The <code>shorts</code> array could, therefore, be
 *      partially updated if the raw memory is unmapped or remapped mid-method.
 *
 * @throws ArrayIndexOutOfBoundsException Thrown if <code>low</code> is less than 0 or greater
 * 		than <code>bytes.length - 1</code>, or if <code>low + number</code> is greater than or
 * 		equal to <code>bytes.length</code>.
 *
 * @throws java.lang.SecurityException Thrown if this access is
 * not permitted by the security manager.
 */
public void getShorts(long offset, short[] shorts, int low, int number) {
    int off = (int)offset;
    checkMultiRead(off, number, 2);
    VM.getData(vbase, off, shorts, low, number, 2);
}
 
开发者ID:tomatsu,项目名称:squawk,代码行数:53,代码来源:RawMemoryAccess.java

示例5: getDoubles

import com.sun.squawk.VM; //导入方法依赖的package包/类
/**
 * Gets <code>number</code> doubles starting at the given offset in the memory area
 *  associated with this object and assign
 * them to the double array passed starting at position <code>low</code>.
 * <p>
 *  The loads are not required to be atomic even if they are located on natural boundaries.
 * <p>
 *  Caching of the memory access is controlled by the memory <code>type</code> requested
 *  when the <code>RawMemoryAccess</code> instance was created.  If the memory is not cached,
 *  this method guarantees serialized access (that is, the memory access at the memory
 *  occurs in the same order as in the program.  Multiple writes to the same location
 *  may not be coalesced.)
 *
 * @param offset The offset in bytes from the beginning of the raw memory area
 *      at which to start loading.
 *
 * @param doubles The array into which the loaded items are placed.
 *
 * @param low The offset which is the starting point in the given array for the
 *            loaded items to be placed.
 *
 * @param number The number of doubles to load.
 *
 * @throws OffsetOutOfBoundsException Thrown if the offset is negative or greater than the size of the
 *      raw memory area.  The role of the <code>SizeOutOfBoundsException</code> somewhat overlaps
 *      this exception since it is thrown if the offset is within the object but outside the
 *      mapped area. (See {@link RawMemoryAccess#map(long base, long size)}).
 *
 * @throws SizeOutOfBoundsException Thrown if the object is not mapped,
 *      or if a double falls in an invalid address range.  This is checked at every
 *      entry in the array to allow for the possibility that the memory area
 *      could be unmapped or remapped.  The <code>doubles</code> array could, therefore, be
 *      partially updated if the raw memory is unmapped or remapped mid-method.
 *
 *
 * @throws ArrayIndexOutOfBoundsException Thrown if <code>low</code> is less than 0 or greater
 * 		than <code>bytes.length - 1</code>, or if <code>low + number</code> is greater than or
 * 		equal to <code>bytes.length</code>.
 *
 * @throws java.lang.SecurityException Thrown if this access is
 * not permitted by the security manager.
 */
public void getDoubles(long offset, double[] doubles, int low, int number) {
    int off = (int) offset;
    checkMultiRead(off, number, 8);
    VM.getData(vbase, off, doubles, low, number, 8);
}
 
开发者ID:tomatsu,项目名称:squawk,代码行数:48,代码来源:RawMemoryFloatAccess.java

示例6: getFloats

import com.sun.squawk.VM; //导入方法依赖的package包/类
/**
 * Gets <code>number</code> floats starting at the given offset in the memory area
 *  associated with this object and assign
 * them to the int array passed starting at position <code>low</code>.
 * <p>
 *  If the floats are aligned on natural boundaries
 *  each float is loaded from memory in a single atomic operation.  Groups of floats
 *  may be loaded together, but this is unspecified.
 *<p>
 *  If the floats are not aligned on natural boundaries they may not be loaded atomically and
 *  the number and order of load operations is unspecified.
 * <p>
 *  Caching of the memory access is controlled by the memory <code>type</code> requested
 *  when the <code>RawMemoryAccess</code> instance was created.  If the memory is not cached,
 *  this method guarantees serialized access (that is, the memory access at the memory
 *  occurs in the same order as in the program.  Multiple writes to the same location
 *  may not be coalesced.)
 *
 * @param offset The offset in bytes from the beginning of the raw memory area
 *      at which to start loading.
 *
 * @param floats The array into which the floats loaded from the raw memory are placed.
 *
 * @param low The offset which is the starting point in the given array for the
 *            loaded items to be placed.
 *
 * @param number The number of floats to loaded.
 *
 * @throws OffsetOutOfBoundsException Thrown if the offset is negative or greater than the size of the
 *      raw memory area.  The role of the <code>SizeOutOfBoundsException</code> somewhat overlaps
 *      this exception since it is thrown if the offset is within the object but outside the
 *      mapped area. (See {@link RawMemoryAccess#map(long base, long size)}).
 *
 * @throws SizeOutOfBoundsException Thrown if the object is not mapped,
 *      or if a float falls in an invalid address range.  This is checked at every
 *      entry in the array to allow for the possibility that the memory area
 *      could be unmapped or remapped.  The <code>floats</code> array could, therefore, be
 *      partially updated if the raw memory is unmapped or remapped mid-method.
 *
 *
 * @throws ArrayIndexOutOfBoundsException Thrown if <code>low</code> is less than 0 or greater
 * 		than <code>bytes.length - 1</code>, or if <code>low + number</code> is greater than or
 * 		equal to <code>bytes.length</code>.
 *
 * @throws java.lang.SecurityException Thrown if this access is
 * not permitted by the security manager.
 */
public void getFloats(long offset, float[] floats, int low, int number) {
    int off = (int) offset;
    checkMultiRead(off, number, 4);
    VM.getData(vbase, off, floats, low, number, 4);
}
 
开发者ID:tomatsu,项目名称:squawk,代码行数:53,代码来源:RawMemoryFloatAccess.java


注:本文中的com.sun.squawk.VM.getData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。