程序包 com.volcengine

类 JSON.SqlDateTypeAdapter

  • 封闭类:
    JSON

    public static class JSON.SqlDateTypeAdapter
    extends com.google.gson.TypeAdapter<Date>
    Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" format will be used (more efficient than SimpleDateFormat).
    • 构造器详细资料

      • SqlDateTypeAdapter

        public SqlDateTypeAdapter()
      • SqlDateTypeAdapter

        public SqlDateTypeAdapter​(DateFormat dateFormat)
    • 方法详细资料

      • setFormat

        public void setFormat​(DateFormat dateFormat)
      • write

        public void write​(com.google.gson.stream.JsonWriter out,
                          Date date)
                   throws IOException
        指定者:
        write 在类中 com.google.gson.TypeAdapter<Date>
        抛出:
        IOException
      • read

        public Date read​(com.google.gson.stream.JsonReader in)
                  throws IOException
        指定者:
        read 在类中 com.google.gson.TypeAdapter<Date>
        抛出:
        IOException