Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make writePrimitive*() and readPrimitive*() methods public. #5709

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public Object readGenericValue() throws IOException {
}
}

private Object readPrimitiveIntArray() throws IOException {
public Object readPrimitiveIntArray() throws IOException {
int length = readVInt();
int[] values = new int[length];
for(int i=0; i<length; i++) {
Expand All @@ -455,7 +455,7 @@ private Object readPrimitiveIntArray() throws IOException {
return values;
}

private Object readPrimitiveLongArray() throws IOException {
public Object readPrimitiveLongArray() throws IOException {
int length = readVInt();
long[] values = new long[length];
for(int i=0; i<length; i++) {
Expand All @@ -464,7 +464,7 @@ private Object readPrimitiveLongArray() throws IOException {
return values;
}

private Object readPrimitiveFloatArray() throws IOException {
public Object readPrimitiveFloatArray() throws IOException {
int length = readVInt();
float[] values = new float[length];
for(int i=0; i<length; i++) {
Expand All @@ -473,7 +473,7 @@ private Object readPrimitiveFloatArray() throws IOException {
return values;
}

private Object readPrimitiveDoubleArray() throws IOException {
public Object readPrimitiveDoubleArray() throws IOException {
int length = readVInt();
double[] values = new double[length];
for(int i=0; i<length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,28 +425,28 @@ public void writeGenericValue(@Nullable Object value) throws IOException {
}
}

private void writePrimitiveIntArray(int[] value) throws IOException {
public void writePrimitiveIntArray(int[] value) throws IOException {
writeVInt(value.length);
for (int i=0; i<value.length; i++) {
writeInt(value[i]);
}
}

private void writePrimitiveLongArray(long[] value) throws IOException {
public void writePrimitiveLongArray(long[] value) throws IOException {
writeVInt(value.length);
for (int i=0; i<value.length; i++) {
writeLong(value[i]);
}
}

private void writePrimitiveFloatArray(float[] value) throws IOException {
public void writePrimitiveFloatArray(float[] value) throws IOException {
writeVInt(value.length);
for (int i=0; i<value.length; i++) {
writeFloat(value[i]);
}
}

private void writePrimitiveDoubleArray(double[] value) throws IOException {
public void writePrimitiveDoubleArray(double[] value) throws IOException {
writeVInt(value.length);
for (int i=0; i<value.length; i++) {
writeDouble(value[i]);
Expand Down