Hi Giorgio, Welcome to discuss the class/interface design. I believe there must be a lot of class/interface design we can improve in the current implementation.
Are you talking about the PageHeader and ChunkHeader? IMO, they are considered as JavaBeans, and serialization/deserialization methods are needed (if we do not use java.io.Serializable) But indeed serializeTo(outputStream) and serializeTo(ByteBuffer) are alternative. What do you think? Best, ----------------------------------- Xiangdong Huang School of Software, Tsinghua University 黄向东 清华大学 软件学院 Giorgio Zoppi <[email protected]> 于2020年5月26日周二 下午10:06写道: > Hello Gents, > > i would like to open discussion about the method serializeTo in *Headers > and so on since i use the Java counterpart for the serialization. > > Those violate the *interface*-*segregation principle* (ISP) that states > that no client should be forced to depend on methods it does not use, > > i would propose to separate serializeTo to an external interface and > implement that interface. So it will make easy for testing, testing just > > a single concern. Let me know what you think about. > > BR, > > Giorgio > > > >
