|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jniwrapper.Parameter
com.jniwrapper.win32.automation.types.BStr
This type is an analog of WideString, usually used by Automation and
corresponds to BSTR native type.
If not specially noted, the memory buffer of the
BStr instance will be automatically freed by NativeResourceCollector when the
instance of this class is garbadge collected.
setAutoDelete(boolean)| Field Summary |
| Fields inherited from class com.jniwrapper.Parameter |
LICENSE_TYPE, V |
| Constructor Summary | |
BStr()
Creates NULL string. |
|
BStr(BStr that)
Creates the new BStr instance from the specified one. |
|
BStr(java.lang.String s)
Creates the new BStr by the specified string value. |
|
BStr(java.lang.String s,
int length)
Creates the new BStr with the specified string value. |
|
| Method Summary | |
void |
acceptIOPerformer(IOPerformer performer,
DataBuffer buffer,
int initialOffset,
boolean isReadOperation,
boolean invokedByCallback)
|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDebugInfo()
|
long |
getHandle()
|
int |
getLength()
Returns the length of the BStr parameter (which equals to the length of the Pointer),
but not the length of the contained string itself. |
java.lang.String |
getValue()
Returns string value of this BStr. |
boolean |
isAutoDelete()
Returns true if the associated native memory buffer is automatically freed by
NativeResourceCollector. |
boolean |
isNull()
|
int |
length()
Returns the length of this BStr. |
int |
lengthInBytes()
Returns the number of bytes of this BStr. |
void |
read(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
|
void |
release()
Releases native resources of this object. |
void |
setAutoDelete(boolean autoDelete)
Makes the NativeResourceCollector automatically free the memory buffer associated with
this object or turn the automatic freeing off. |
protected void |
setHandle(long value)
|
void |
setNull()
Deprecated. Use release() method instead. |
void |
setValue(java.lang.String value)
Sets the new value to this BStr object. |
void |
setValue(java.lang.String value,
int length)
Sets the new value to this BStr. |
java.lang.String |
toString()
|
void |
write(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
|
| Methods inherited from class com.jniwrapper.Parameter |
|
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BStr()
public BStr(java.lang.String s)
BStr by the specified string value.
s - string valuepublic BStr(BStr that)
BStr instance from the specified one.
that - value that will be used for creating new instance.
public BStr(java.lang.String s,
int length)
BStr with the specified string value.
The length parameter specifies the number of characters
in the string, in case if it may contain null characters within.
s - string valuelength - number of the characters in the string| Method Detail |
public void setValue(java.lang.String value)
BStr object.
setValue in interface StringParametervalue - new string value
public void setValue(java.lang.String value,
int length)
BStr.
The length parameter specifies the number of
characters in the string, in case if it may contain null characters within.
value - new string valuelength - number of the characters in the stringpublic java.lang.String getValue()
BStr.
getValue in interface StringParameterBStrpublic int length()
BStr.
BStrpublic int lengthInBytes()
BStr.
BStrpublic boolean isAutoDelete()
true if the associated native memory buffer is automatically freed by
NativeResourceCollector.
isAutoDelete in interface AutoDeleteParametertrue if the native memory buffer is automatically freed, otherwise false.public void setAutoDelete(boolean autoDelete)
NativeResourceCollector automatically free the memory buffer associated with
this object or turn the automatic freeing off.
setAutoDelete in interface AutoDeleteParameterautoDelete - if true the memory will be freed automatically,
otherwise manual freeing is required.public void release()
public int getLength()
BStr parameter (which equals to the length of the Pointer),
but not the length of the contained string itself.
To obtain the length of this string use length() method.
BStr parameterpublic boolean isNull()
isNull in interface PointerParametertrue if the reference string is NULL, false otherwise.public void setNull()
release() method instead.
NULL value.
public long getHandle()
protected void setHandle(long value)
public void write(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
throws MemoryAccessViolationException
MemoryAccessViolationException
public void read(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
throws MemoryAccessViolationException
MemoryAccessViolationExceptionpublic java.lang.Object clone()
public void acceptIOPerformer(IOPerformer performer,
DataBuffer buffer,
int initialOffset,
boolean isReadOperation,
boolean invokedByCallback)
public java.lang.String getDebugInfo()
public java.lang.String toString()
getValue()public boolean equals(java.lang.Object obj)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||