Interface Serializer
- All Known Implementing Classes:
JsonSerializer
,JsonSerializerJsonLite
,JsonSerializerJsonP
,JsonSerializerJsonSimple
,PdfSerializer
public interface Serializer
Subclasses of
Serializer
class provide methods to serialize PerunAPI's datatypes (as JSON, for example).
Implementing any of the write* methods except write(PerunException)
, write(PerunRuntimeException)
is
optional.- Since:
- 0.1
- Author:
- Jan Klos invalid input: '<'ddd@mail.muni.cz>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
SerializesPerunException
.void
SerializesPerunRuntimeException
.
-
Method Details
-
getContentType
String getContentType()- Returns:
- Content-type of this serializer's output format and its encoding.
-
write
- Throws:
IOException
-
writePerunException
SerializesPerunException
.- Parameters:
pex
-PerunException
to serialize- Throws:
IOException
- If an IO error occurs
-
writePerunRuntimeException
SerializesPerunRuntimeException
.- Parameters:
prex
-PerunRuntimeException
to serialize- Throws:
IOException
- If an IO error occurs
-