|
|
|
@ -223,13 +223,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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------
|
|
|
|
|
|
|
|
|
@ -699,26 +721,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 |
|
|
|
@ -1411,26 +1413,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 |
|
|
|
@ -2176,26 +2158,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; |
|
|
|
@ -3307,26 +3269,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 |
|
|
|
|