summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java')
-rw-r--r--core/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/core/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java b/core/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java
index 478f3a8a08..60a188ca6c 100644
--- a/core/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java
+++ b/core/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java
@@ -86,12 +86,42 @@ public interface XContentGenerator extends Closeable, Flushable {
void writeBinary(byte[] value, int offset, int length) throws IOException;
+ /**
+ * Writes a raw field with the value taken from the bytes in the stream
+ * @deprecated use {@link #writeRawField(String, InputStream, XContentType)} to avoid content type auto-detection
+ */
+ @Deprecated
void writeRawField(String name, InputStream value) throws IOException;
+ /**
+ * Writes a raw field with the value taken from the bytes in the stream
+ */
+ void writeRawField(String name, InputStream value, XContentType xContentType) throws IOException;
+
+ /**
+ * Writes a raw field with the given bytes as the value
+ * @deprecated use {@link #writeRawField(String, BytesReference, XContentType)} to avoid content type auto-detection
+ */
+ @Deprecated
void writeRawField(String name, BytesReference value) throws IOException;
+ /**
+ * Writes a raw field with the given bytes as the value
+ */
+ void writeRawField(String name, BytesReference value, XContentType xContentType) throws IOException;
+
+ /**
+ * Writes a value with the source coming directly from the bytes
+ * @deprecated use {@link #writeRawValue(BytesReference, XContentType)} to avoid content type auto-detection
+ */
+ @Deprecated
void writeRawValue(BytesReference value) throws IOException;
+ /**
+ * Writes a value with the source coming directly from the bytes
+ */
+ void writeRawValue(BytesReference value, XContentType xContentType) throws IOException;
+
void copyCurrentStructure(XContentParser parser) throws IOException;
/**