am c5b11fcc: am ff83ed2d: am b02dadd4: Merge "Create FieldPacker.getPos() to get the actual amount of data used for FP."
* commit 'c5b11fcc1f4fc4fba988218d0a99a19690398a56': Create FieldPacker.getPos() to get the actual amount of data used for FP.
This commit is contained in:
@@ -75,7 +75,7 @@ public class FieldPacker {
|
||||
mPos = 0;
|
||||
}
|
||||
public void reset(int i) {
|
||||
if ((i < 0) || (i >= mLen)) {
|
||||
if ((i < 0) || (i > mLen)) {
|
||||
throw new RSIllegalArgumentException("out of range argument: " + i);
|
||||
}
|
||||
mPos = i;
|
||||
@@ -605,6 +605,15 @@ public class FieldPacker {
|
||||
return mData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the actual length used for the FieldPacker.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public int getPos() {
|
||||
return mPos;
|
||||
}
|
||||
|
||||
private final byte mData[];
|
||||
private int mPos;
|
||||
private int mLen;
|
||||
|
||||
Reference in New Issue
Block a user