本文整理汇总了Java中com.helger.commons.io.stream.StreamHelper.readSafeUTF方法的典型用法代码示例。如果您正苦于以下问题:Java StreamHelper.readSafeUTF方法的具体用法?Java StreamHelper.readSafeUTF怎么用?Java StreamHelper.readSafeUTF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.helger.commons.io.stream.StreamHelper
的用法示例。
在下文中一共展示了StreamHelper.readSafeUTF方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readObject
import com.helger.commons.io.stream.StreamHelper; //导入方法依赖的package包/类
private void readObject (@Nonnull final ObjectInputStream aOIS) throws IOException
{
final int nInitialSize = aOIS.readInt ();
m_aValues = new CommonsArrayList <> (nInitialSize);
final String sJson = StreamHelper.readSafeUTF (aOIS);
final JsonArray aJson = (JsonArray) JsonReader.readFromString (sJson);
m_aValues.addAll (aJson.m_aValues);
}
示例2: readObject
import com.helger.commons.io.stream.StreamHelper; //导入方法依赖的package包/类
private void readObject (@Nonnull final ObjectInputStream aOIS) throws IOException
{
final int nInitialSize = aOIS.readInt ();
m_aValues = new CommonsLinkedHashMap <> (nInitialSize);
final String sJson = StreamHelper.readSafeUTF (aOIS);
final JsonObject aJson = (JsonObject) JsonReader.readFromString (sJson);
m_aValues.putAll (aJson.m_aValues);
}
示例3: readObject
import com.helger.commons.io.stream.StreamHelper; //导入方法依赖的package包/类
private void readObject (@Nonnull @WillNotClose final ObjectInputStream aOIS) throws IOException,
ClassNotFoundException
{
m_sID = StreamHelper.readSafeUTF (aOIS);
final String sBaseFontName = StreamHelper.readSafeUTF (aOIS);
m_aFont = STANDARD_14.get (sBaseFontName);
m_aFontRes = (IFontResource) aOIS.readObject ();
m_bEmbed = aOIS.readBoolean ();
m_nFallbackCodePoint = aOIS.readInt ();
_parseFontRes ();
}
示例4: readObject
import com.helger.commons.io.stream.StreamHelper; //导入方法依赖的package包/类
private void readObject (@Nonnull final ObjectInputStream aOIS) throws IOException
{
final String sJson = StreamHelper.readSafeUTF (aOIS);
final JsonValue aJson = (JsonValue) JsonReader.readFromString (sJson);
m_aValue = aJson.m_aValue;
}
示例5: readObject
import com.helger.commons.io.stream.StreamHelper; //导入方法依赖的package包/类
private void readObject (@Nonnull final ObjectInputStream aOIS) throws IOException
{
m_sPath = StreamHelper.readSafeUTF (aOIS);
}