Javolution - reading variable-length string
How to read variable length String from a C struct using Javolution API?
For e开发者_运维百科xample the code below is used to get a fixed size String- public final UTF8String data= new UTF8String(100);
Can anyone give me an example for reading variable length String.
This is what we have and we are learning as well:
public class EvDasTestResults extends AbstractServiceJavolutionObject
{
public final Signed32 result = new Signed32();
public final UTF8String description;
public EvDasTestResults(int size)
{
description = new UTF8String(size);
}
}
public abstract class AbstractServiceJavolutionObject extends Struct
{
@Override
public ByteOrder byteOrder()
{
return ByteOrder.nativeOrder();
}
@Override
public boolean isPacked()
{
return true;
}
}
精彩评论