Java Doc for VoidPointer.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » awt » nativebridge » 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.awt.nativebridge 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.harmony.awt.nativebridge.VoidPointer

All known Subclasses:   org.apache.harmony.awt.nativebridge.Int64Pointer,  org.apache.harmony.awt.nativebridge.CommonStructWrapper,  org.apache.harmony.awt.nativebridge.Int8Pointer,  org.apache.harmony.awt.nativebridge.Int16Pointer,  org.apache.harmony.awt.nativebridge.DoublePointer,  org.apache.harmony.awt.nativebridge.CLongPointer,  org.apache.harmony.awt.nativebridge.Int32Pointer,  org.apache.harmony.awt.nativebridge.PointerPointer,  org.apache.harmony.awt.nativebridge.FloatPointer,
VoidPointer
abstract public class VoidPointer (Code)
This class represents pointer to memory for working with native functions. It is an analogue of void* C type. Every pointed object can be direct native object or Java object. In both cases NativeBridge provides correct passing addresses to native functions, native address is passed as is, Java object will be implicitly locked and address of lock will be passed to native. NULL pointer can't be wrapped by this object, NULL is represents by Java null value.
See Also:   org.apache.harmony.misc.accessors.MemoryAccessor
See Also:   org.apache.harmony.misc.accessors.ArrayAccessor


Field Summary
public  ByteBasebyteBase
    
 booleanexplicitlyLocked
    

Constructor Summary
 VoidPointer(int size, boolean direct)
    
 VoidPointer(byte[] arr, int offset, int size)
    
 VoidPointer(long addr)
    
 VoidPointer(VoidPointer p)
    
 VoidPointer(ByteBase base)
    

Method Summary
public  voidcopy(VoidPointer src, int dstOffset, int length)
     Copies length bytes from src VoidPointer to this. Offset in a destination is dstOffset.
public  voidfree()
     Frees memory represented by this pointer.
final  longinternalLongLock()
     Internal long lock.
final  voidinternalRelease()
     Internal release.
final  voidinternalReleaseNoCopy()
     Internal release.
final  longinternalShortLock()
     Internal short lock.
public  booleanisDirect()
    
final public  longlock()
     Returns the memory address for this pointer.
public  longlongLockPointer()
    
final public  voidrelease()
     Performs the explicit release of Java object.
final public  voidreleaseNoCopy()
     Performs the explicit releaseNoCopy of Java object.
public  longshortLockPointer()
    
abstract public  intsize()
    
public  voidunlock()
    

Field Detail
byteBase
public ByteBase byteBase(Code)



explicitlyLocked
boolean explicitlyLocked(Code)




Constructor Detail
VoidPointer
VoidPointer(int size, boolean direct)(Code)



VoidPointer
VoidPointer(byte[] arr, int offset, int size)(Code)



VoidPointer
VoidPointer(long addr)(Code)



VoidPointer
VoidPointer(VoidPointer p)(Code)



VoidPointer
VoidPointer(ByteBase base)(Code)




Method Detail
copy
public void copy(VoidPointer src, int dstOffset, int length)(Code)
Copies length bytes from src VoidPointer to this. Offset in a destination is dstOffset. Starting offset in source is always 0;
Parameters:
  src - source byte base
Parameters:
  dstOffset - destination
Parameters:
  length -



free
public void free()(Code)
Frees memory represented by this pointer. In case of direct object - the native memory is deallocated. In case of locked Java memory - it is released (back copying values to Java is not performed).
See Also:   org.apache.harmony.misc.accessors.LockedArray.releaseNoCopy



internalLongLock
final long internalLongLock()(Code)
Internal long lock. Used in NativeBridge wrappers for native functions. - memory address.



internalRelease
final void internalRelease()(Code)
Internal release. Unlocks objects if it was implicitly locked. This methods don't release exlicitly locked Java objects.



internalReleaseNoCopy
final void internalReleaseNoCopy()(Code)
Internal release. Unlocks objects if it was implicitly locked. This methods don't release exlicitly locked Java objects. This methods gives a hint, that values should not be copied back to Java object. Used for "in" parameters of functions.



internalShortLock
final long internalShortLock()(Code)
Internal short lock. Used in NativeBridge wrappers for native functions. - memory address.



isDirect
public boolean isDirect()(Code)



lock
final public long lock()(Code)
Returns the memory address for this pointer. Performs the explicit lock of the pointed memory. If this object is direct pointer to native memory - returns native address, If this object reference to Java object, then Java object is locked and memory address for locked Java object is returned. Explicitly locked object should be released after usage.
See Also:   VoidPointer.release()
See Also:   VoidPointer.free()
See Also:    h



longLockPointer
public long longLockPointer()(Code)



release
final public void release()(Code)
Performs the explicit release of Java object. This method does nothing if object is direct native pointer or non-locked Java memory.



releaseNoCopy
final public void releaseNoCopy()(Code)
Performs the explicit releaseNoCopy of Java object. This method does nothing if object is direct native pointer or non-locked Java memory.



shortLockPointer
public long shortLockPointer()(Code)
performs short lock



size
abstract public int size()(Code)



unlock
public void unlock()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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