Loading api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -2146,6 +2146,7 @@ package android.util.proto { method public static int getRawZigZag64Size(long); method public int getReadPos(); method public int getReadableSize(); method public int getSize(); method public int getWriteBufIndex(); method public int getWriteIndex(); method public int getWritePos(); Loading Loading @@ -2205,6 +2206,7 @@ package android.util.proto { method @Deprecated public void endRepeatedObject(long); method public void flush(); method public byte[] getBytes(); method public int getRawSize(); method public static long makeFieldId(int, long); method public long start(long); method @Deprecated public long startObject(long); Loading core/java/android/util/proto/EncodedBuffer.java +8 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,14 @@ public final class EncodedBuffer { return mReadableSize; } /** * Returns the buffer size * @return the buffer size */ public int getSize() { return ((mBufferCount - 1) * mChunkSize) + mWriteIndex; } // // Reading from the read position. // Loading core/java/android/util/proto/ProtoOutputStream.java +12 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,18 @@ public final class ProtoOutputStream extends ProtoStream { this(new FileOutputStream(fd)); } /** * Returns the uncompressed buffer size * @return the uncompressed buffer size */ public int getRawSize() { if (mCompacted) { return getBytes().length; } else { return mBuffer.getSize(); } } /** * Write a value for the given fieldId. * Loading Loading
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -2146,6 +2146,7 @@ package android.util.proto { method public static int getRawZigZag64Size(long); method public int getReadPos(); method public int getReadableSize(); method public int getSize(); method public int getWriteBufIndex(); method public int getWriteIndex(); method public int getWritePos(); Loading Loading @@ -2205,6 +2206,7 @@ package android.util.proto { method @Deprecated public void endRepeatedObject(long); method public void flush(); method public byte[] getBytes(); method public int getRawSize(); method public static long makeFieldId(int, long); method public long start(long); method @Deprecated public long startObject(long); Loading
core/java/android/util/proto/EncodedBuffer.java +8 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,14 @@ public final class EncodedBuffer { return mReadableSize; } /** * Returns the buffer size * @return the buffer size */ public int getSize() { return ((mBufferCount - 1) * mChunkSize) + mWriteIndex; } // // Reading from the read position. // Loading
core/java/android/util/proto/ProtoOutputStream.java +12 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,18 @@ public final class ProtoOutputStream extends ProtoStream { this(new FileOutputStream(fd)); } /** * Returns the uncompressed buffer size * @return the uncompressed buffer size */ public int getRawSize() { if (mCompacted) { return getBytes().length; } else { return mBuffer.getSize(); } } /** * Write a value for the given fieldId. * Loading