Class FileAdapter
java.lang.Object
com.google.gson.TypeAdapter
com.compomics.util.io.json.adapter.FileAdapter
public class FileAdapter
extends com.google.gson.TypeAdapter
This class is intended to avoid the default behavior of the GSON parser to
append the current path to the absolute path of a file. It should always be
registered in the GSON builder as this is not wanted behavior.
- Author:
- Kenneth Verheggen
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
FileAdapter
public FileAdapter()Empty default constructor.
-
-
Method Details
-
read
- Specified by:
readin classcom.google.gson.TypeAdapter- Throws:
IOException
-
write
- Specified by:
writein classcom.google.gson.TypeAdapter- Throws:
IOException
-