Java Doc for IMemorySystem.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » luni » platform » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » org package » org.apache.harmony.luni.platform 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.harmony.luni.platform.IMemorySystem

All known Subclasses:   org.apache.harmony.luni.platform.OSMemory,
IMemorySystem
public interface IMemorySystem (Code)
IMemorySystem


Field Summary
final public  intMMAP_READ_ONLY
    
final public  intMMAP_READ_WRITE
    
final public  intMMAP_WRITE_COPY
    


Method Summary
public  voidflush(long addr, long size)
    
public  voidfree(long address)
     Deallocates space for a memory block that was previously allocated by a call to IMemorySystem.malloc(long) malloc(long) .
public  longgetAddress(long address)
     Gets the value of the platform pointer at the given address.

The length of the platform pointer is defined by POINTER_SIZE.

The behavior is unspecified if (address ...
public  bytegetByte(long address)
    
public  voidgetByteArray(long address, byte[] bytes, int offset, int length)
     Copies length bytes from the memory block at address into the byte array bytes starting at element offset within the byte array.

The behavior of this method is undefined if the range (address ...

public  doublegetDouble(long address)
     Gets the value of the IEEE754-format eight-byte float stored in platform byte order at the given address.

The behavior is unspecified if (address ...

public  doublegetDouble(long address, Endianness endianness)
    
public  floatgetFloat(long address)
     Gets the value of the IEEE754-format four-byte float stored in platform byte order at the given address.

The behavior is unspecified if (address ...

public  floatgetFloat(long address, Endianness endianness)
    
public  intgetInt(long address)
     Gets the value of the signed four-byte integer stored in platform byte-order at the given address.

The behavior is unspecified if (address ...

public  intgetInt(long address, Endianness endianness)
    
public  longgetLong(long address)
     Gets the value of the signed eight-byte integer stored in platform byte order at the given address.

The behavior is unspecified if (address ...

public  longgetLong(long address, Endianness endianness)
    
public  intgetPointerSize()
     Answers the platform pointer size.
public  shortgetShort(long address)
     Gets the value of the signed two-byte integer stored in platform byte order at the given address.

The behavior is unspecified if (address ...

public  shortgetShort(long address, Endianness endianness)
    
public  booleanisLittleEndian()
     Answers true if the platform is little endian, otherwise it may be assumed to be big endian..
public  booleanisLoaded(long addr, long size)
    
public  voidload(long addr, long size)
    
public  longmalloc(long length)
     Allocates and returns a pointer to space for a memory block of length bytes.
public  voidmemmove(long destAddress, long srcAddress, long length)
     Copies length bytes from srcAddress to destAddress.
public  voidmemset(long address, byte value, long length)
     Places value into first length bytes of the memory block starting at address.

The behavior is unspecified if (address ...

public  longmmap(long fileDescriptor, long alignment, long size, int mapMode)
    
public  voidsetAddress(long address, long value)
     Sets the value of the platform pointer at the given address.

The length of the platform pointer is defined by POINTER_SIZE.

public  voidsetByte(long address, byte value)
     Sets the given single byte value at the given address.
public  voidsetByteArray(long address, byte[] bytes, int offset, int length)
     Copies length bytes from the byte array bytes into the memory block at address, starting at element offset within the byte array.

The behavior of this method is undefined if the range (address ...

public  voidsetDouble(long address, double value)
     Sets the value of the IEEE754-format eight-byte float store in platform byte order at the given address.

The behavior is unspecified if (address ...

public  voidsetDouble(long address, double value, Endianness endianness)
    
public  voidsetFloat(long address, float value)
     Sets the value of the IEEE754-format four-byte float stored in platform byte order at the given address.

The behavior is unspecified if (address ...

public  voidsetFloat(long address, float value, Endianness endianness)
    
public  voidsetInt(long address, int value)
     Sets the value of the signed four-byte integer at the given address in platform byte order.

The behavior is unspecified if (address ...

public  voidsetInt(long address, int value, Endianness endianness)
    
public  voidsetLong(long address, long value)
     Sets the value of the signed eight-byte integer at the given address in the platform byte order.

The behavior is unspecified if (address ...

public  voidsetLong(long address, long value, Endianness endianness)
    
public  voidsetShort(long address, short value)
     Sets the value of the signed two-byte integer at the given address in platform byte order.

The behavior is unspecified if (address ...

public  voidsetShort(long address, short value, Endianness endianness)
    
public  voidunmap(long addr, long size)
    

Field Detail
MMAP_READ_ONLY
final public int MMAP_READ_ONLY(Code)



MMAP_READ_WRITE
final public int MMAP_READ_WRITE(Code)



MMAP_WRITE_COPY
final public int MMAP_WRITE_COPY(Code)





Method Detail
flush
public void flush(long addr, long size)(Code)
TODO : JavaDoc



free
public void free(long address)(Code)
Deallocates space for a memory block that was previously allocated by a call to IMemorySystem.malloc(long) malloc(long) . The number of bytes freed is identical to the number of bytes acquired when the memory block was allocated. If address is zero the method does nothing.

Freeing a pointer to a memory block that was not allocated by malloc() has unspecified effect.


Parameters:
  address - the address of the memory block to deallocate.



getAddress
public long getAddress(long address)(Code)
Gets the value of the platform pointer at the given address.

The length of the platform pointer is defined by POINTER_SIZE.

The behavior is unspecified if (address ... address + POINTER_SIZE) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the platform pointer. the value of the platform pointer as a Java long.



getByte
public byte getByte(long address)(Code)



getByteArray
public void getByteArray(long address, byte[] bytes, int offset, int length) throws NullPointerException, IndexOutOfBoundsException(Code)
Copies length bytes from the memory block at address into the byte array bytes starting at element offset within the byte array.

The behavior of this method is undefined if the range (address ... address + length) is not within a memory block that was allocated using IMemorySystem.malloc(long) malloc(long) .


Parameters:
  address - the address of the OS memory block from which to copy bytes.
Parameters:
  bytes - the byte array into which to copy the bytes.
Parameters:
  offset - the index of the first element in bytes thatwill be overwritten.
Parameters:
  length - the total number of bytes to copy into the byte array.
throws:
  NullPointerException - if bytes is null.
throws:
  IndexOutOfBoundsException - if offset + length > bytes.length.



getDouble
public double getDouble(long address)(Code)
Gets the value of the IEEE754-format eight-byte float stored in platform byte order at the given address.

The behavior is unspecified if (address ... address + 8) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the eight-byte value. the value of the eight-byte float as a Java double.



getDouble
public double getDouble(long address, Endianness endianness)(Code)



getFloat
public float getFloat(long address)(Code)
Gets the value of the IEEE754-format four-byte float stored in platform byte order at the given address.

The behavior is unspecified if (address ... address + 4) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the eight-byte value. the value of the four-byte float as a Java float.



getFloat
public float getFloat(long address, Endianness endianness)(Code)



getInt
public int getInt(long address)(Code)
Gets the value of the signed four-byte integer stored in platform byte-order at the given address.

The behavior is unspecified if (address ... address + 4) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the four-byte value. the value of the four-byte integer as a Java int.



getInt
public int getInt(long address, Endianness endianness)(Code)



getLong
public long getLong(long address)(Code)
Gets the value of the signed eight-byte integer stored in platform byte order at the given address.

The behavior is unspecified if (address ... address + 8) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the eight-byte value. the value of the eight-byte integer as a Java long.



getLong
public long getLong(long address, Endianness endianness)(Code)



getPointerSize
public int getPointerSize()(Code)
Answers the platform pointer size. the native platform pointer size, in bytes.



getShort
public short getShort(long address)(Code)
Gets the value of the signed two-byte integer stored in platform byte order at the given address.

The behavior is unspecified if (address ... address + 2) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the two-byte value. the value of the two-byte integer as a Java short.



getShort
public short getShort(long address, Endianness endianness)(Code)



isLittleEndian
public boolean isLittleEndian()(Code)
Answers true if the platform is little endian, otherwise it may be assumed to be big endian.. true if the platform is little endian.



isLoaded
public boolean isLoaded(long addr, long size)(Code)
TODO: JavaDoc



load
public void load(long addr, long size)(Code)
TODO: JavaDoc



malloc
public long malloc(long length) throws OutOfMemoryError(Code)
Allocates and returns a pointer to space for a memory block of length bytes. The space is uninitialized and may be larger than the number of bytes requested; however, the guaranteed usable memory block is exactly length bytes long.
Parameters:
  length - number of bytes requested. the address of the start of the memory block.
throws:
  OutOfMemoryError - if the request cannot be satisfied.



memmove
public void memmove(long destAddress, long srcAddress, long length)(Code)
Copies length bytes from srcAddress to destAddress. Where any part of the source memory block and the destination memory block overlap memmove() ensures that the original source bytes in the overlapping region are copied before being overwritten.

The behavior is unspecified if (srcAddress ... srcAddress + length) and (destAddress ... destAddress + length) are not both wholly within the range that was previously allocated using malloc().


Parameters:
  destAddress - the address of the destination memory block.
Parameters:
  srcAddress - the address of the source memory block.
Parameters:
  length - the number of bytes to move.



memset
public void memset(long address, byte value, long length)(Code)
Places value into first length bytes of the memory block starting at address.

The behavior is unspecified if (address ... address + length) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the address of the first memory location.
Parameters:
  value - the byte value to set at each location.
Parameters:
  length - the number of byte-length locations to set.



mmap
public long mmap(long fileDescriptor, long alignment, long size, int mapMode) throws IOException(Code)
TODO: JavaDoc
Parameters:
  fileDescriptor -
Parameters:
  alignment -
Parameters:
  size -
Parameters:
  mapMode -
throws:
  IOException -



setAddress
public void setAddress(long address, long value)(Code)
Sets the value of the platform pointer at the given address.

The length of the platform pointer is defined by POINTER_SIZE. This method only sets POINTER_SIZE bytes at the given address.

The behavior is unspecified if (address ... address + POINTER_SIZE) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the platform pointer.
Parameters:
  value - the value of the platform pointer as a Java long.



setByte
public void setByte(long address, byte value)(Code)
Sets the given single byte value at the given address.

The behavior is unspecified if address is not in the range that was previously allocated using malloc().


Parameters:
  address - the address at which to set the byte value.
Parameters:
  value - the value to set.



setByteArray
public void setByteArray(long address, byte[] bytes, int offset, int length) throws NullPointerException, IndexOutOfBoundsException(Code)
Copies length bytes from the byte array bytes into the memory block at address, starting at element offset within the byte array.

The behavior of this method is undefined if the range (address ... address + length) is not within a memory block that was allocated using IMemorySystem.malloc(long) malloc(long) .


Parameters:
  address - the address of the OS memory block into which to copy thebytes.
Parameters:
  bytes - the byte array from which to copy the bytes.
Parameters:
  offset - the index of the first element in bytes thatwill be read.
Parameters:
  length - the total number of bytes to copy from bytesinto the memory block.
throws:
  NullPointerException - if bytes is null.
throws:
  IndexOutOfBoundsException - if offset + length > bytes.length.



setDouble
public void setDouble(long address, double value)(Code)
Sets the value of the IEEE754-format eight-byte float store in platform byte order at the given address.

The behavior is unspecified if (address ... address + 8) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the eight-byte value.
Parameters:
  value - the value of the eight-byte float as a Javadouble.



setDouble
public void setDouble(long address, double value, Endianness endianness)(Code)



setFloat
public void setFloat(long address, float value)(Code)
Sets the value of the IEEE754-format four-byte float stored in platform byte order at the given address.

The behavior is unspecified if (address ... address + 4) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the eight-byte value.
Parameters:
  value - the value of the four-byte float as a Java float.



setFloat
public void setFloat(long address, float value, Endianness endianness)(Code)



setInt
public void setInt(long address, int value)(Code)
Sets the value of the signed four-byte integer at the given address in platform byte order.

The behavior is unspecified if (address ... address + 4) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the four-byte value.
Parameters:
  value - the value of the four-byte integer as a Java int.



setInt
public void setInt(long address, int value, Endianness endianness)(Code)



setLong
public void setLong(long address, long value)(Code)
Sets the value of the signed eight-byte integer at the given address in the platform byte order.

The behavior is unspecified if (address ... address + 8) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the eight-byte value.
Parameters:
  value - the value of the eight-byte integer as a Javalong.



setLong
public void setLong(long address, long value, Endianness endianness)(Code)



setShort
public void setShort(long address, short value)(Code)
Sets the value of the signed two-byte integer at the given address in platform byte order.

The behavior is unspecified if (address ... address + 2) is not wholly within the range that was previously allocated using malloc().


Parameters:
  address - the platform address of the start of the two-byte value.
Parameters:
  value - the value of the two-byte integer as a Java short.



setShort
public void setShort(long address, short value, Endianness endianness)(Code)



unmap
public void unmap(long addr, long size)(Code)
TODO: JavaDoc
Parameters:
  addr -
throws:
  IOException -



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.