aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java')
-rw-r--r--java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java31
1 files changed, 1 insertions, 30 deletions
diff --git a/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java b/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java
index 367fa23..90f7ffb 100644
--- a/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java
+++ b/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -40,32 +40,11 @@ import java.io.IOException;
*/
public class InvalidProtocolBufferException extends IOException {
private static final long serialVersionUID = -1616151763072450476L;
- private MessageLite unfinishedMessage = null;
public InvalidProtocolBufferException(final String description) {
super(description);
}
- /**
- * Attaches an unfinished message to the exception to support best-effort
- * parsing in {@code Parser} interface.
- *
- * @return this
- */
- public InvalidProtocolBufferException setUnfinishedMessage(
- MessageLite unfinishedMessage) {
- this.unfinishedMessage = unfinishedMessage;
- return this;
- }
-
- /**
- * Returns the unfinished message attached to the exception, or null if
- * no message is attached.
- */
- public MessageLite getUnfinishedMessage() {
- return unfinishedMessage;
- }
-
static InvalidProtocolBufferException truncatedMessage() {
return new InvalidProtocolBufferException(
"While parsing a protocol message, the input ended unexpectedly " +
@@ -111,12 +90,4 @@ public class InvalidProtocolBufferException extends IOException {
"Protocol message was too large. May be malicious. " +
"Use CodedInputStream.setSizeLimit() to increase the size limit.");
}
-
- static InvalidProtocolBufferException parseFailure() {
- return new InvalidProtocolBufferException("Failed to parse the message.");
- }
-
- static InvalidProtocolBufferException invalidUtf8() {
- return new InvalidProtocolBufferException("Protocol message had invalid UTF-8.");
- }
}