Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
检查文件中的二进制数据是否未损坏的最佳做法是什么?
有一些字符串(长度 + 字符)和一些地图(地图的第一个大小,而不是字符串)。
当数据损坏时,我会陷入无限循环,因为地图的大小可能是非常大的价值。
任何想法如何检查并确保二进制数据在读取之前/期间没有损坏?
最简单的解决方案是某种哈希/校验和。有几种选择:
随便挑吧:)
在我的 xhtml 页面中,我使用了一个<h:selectOneMenu>组件。为了填充数据,我在<s:selectItems>组件内部使用了一个组件。我需要的是有条件地改变某个selectItem. 有可能还是有其他方法? 例如,如果选项的标签是“铅
<h:selectOneMenu>
<s:selectItems>
selectItem