forked from getsentry/sentry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoOpSerializer.java
More file actions
42 lines (32 loc) · 1011 Bytes
/
NoOpSerializer.java
File metadata and controls
42 lines (32 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package io.sentry;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.util.Map;
import org.jetbrains.annotations.Nullable;
/** No-op implementation of ISerializer */
final class NoOpSerializer implements ISerializer {
private static final NoOpSerializer instance = new NoOpSerializer();
public static NoOpSerializer getInstance() {
return instance;
}
private NoOpSerializer() {}
@Override
public <T> T deserialize(Reader reader, Class<T> clazz) {
return null;
}
@Override
public @Nullable SentryEnvelope deserializeEnvelope(InputStream inputStream) {
return null;
}
@Override
public <T> void serialize(T entity, Writer writer) throws IOException {}
@Override
public void serialize(SentryEnvelope envelope, OutputStream outputStream) throws Exception {}
@Override
public @Nullable String serialize(Map<String, Object> data) throws Exception {
return null;
}
}