|
|
|
@ -224,13 +224,35 @@ public abstract class CodedInputStream { |
|
|
|
|
* Reads and discards an entire message. This will read either until EOF or until an endgroup tag, |
|
|
|
|
* whichever comes first. |
|
|
|
|
*/ |
|
|
|
|
public abstract void skipMessage() throws IOException; |
|
|
|
|
public void skipMessage() throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
boolean fieldSkipped = skipField(tag); |
|
|
|
|
if (!fieldSkipped) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Reads an entire message and writes it to output in wire format. This will read either until EOF |
|
|
|
|
* or until an endgroup tag, whichever comes first. |
|
|
|
|
*/ |
|
|
|
|
public abstract void skipMessage(CodedOutputStream output) throws IOException; |
|
|
|
|
public void skipMessage(CodedOutputStream output) throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
boolean fieldSkipped = skipField(tag, output); |
|
|
|
|
if (!fieldSkipped) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
|
|
|
|
@ -700,26 +722,6 @@ public abstract class CodedInputStream { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void skipMessage() throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0 || !skipField(tag)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void skipMessage(CodedOutputStream output) throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0 || !skipField(tag, output)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -1412,26 +1414,6 @@ public abstract class CodedInputStream { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void skipMessage() throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0 || !skipField(tag)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void skipMessage(CodedOutputStream output) throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0 || !skipField(tag, output)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -2178,26 +2160,6 @@ public abstract class CodedInputStream { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void skipMessage() throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0 || !skipField(tag)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void skipMessage(CodedOutputStream output) throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0 || !skipField(tag, output)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** Collects the bytes skipped and returns the data in a ByteBuffer. */ |
|
|
|
|
private class SkippedDataSink implements RefillCallback { |
|
|
|
|
private int lastPos = pos; |
|
|
|
@ -3325,26 +3287,6 @@ public abstract class CodedInputStream { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void skipMessage() throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0 || !skipField(tag)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void skipMessage(CodedOutputStream output) throws IOException { |
|
|
|
|
while (true) { |
|
|
|
|
final int tag = readTag(); |
|
|
|
|
if (tag == 0 || !skipField(tag, output)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|