java.io.ObjectOutputStream.writeBytes()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中java.io.ObjectOutputStream.writeBytes()方法的一些代码示例,展示了ObjectOutputStream.writeBytes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.writeBytes()方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:writeBytes

ObjectOutputStream.writeBytes介绍

[英]Writes the string value as a sequence of bytes to the target stream. Only the least significant byte of each character in the string is written.
[中]将字符串值作为字节序列写入目标流。只写入字符串中每个字符的最低有效字节。

代码示例

代码示例来源:origin: wildfly/wildfly

/** {@inheritDoc} */
public void writeBytes(final String str) throws IOException {
  oos.writeBytes(str);
}

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override public void writeBytes(@NotNull String s) throws IOException {
  oos.writeBytes(s);
}

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override public void writeBytes(@NotNull String s) throws IOException {
  oos.writeBytes(s);
}

代码示例来源:origin: org.jboss.marshalling/jboss-marshalling

/** {@inheritDoc} */
public void writeBytes(final String str) throws IOException {
  oos.writeBytes(str);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/** {@inheritDoc} */
public void writeBytes(final String str) throws IOException {
  oos.writeBytes(str);
}

代码示例来源:origin: org.jboss.marshalling/jboss-marshalling-osgi

/** {@inheritDoc} */
public void writeBytes(final String str) throws IOException {
  oos.writeBytes(str);
}

代码示例来源:origin: babyfish-ct/babyfish

@Override
public void writeBytes(String s) throws IOException {
  this.raw.writeBytes(s);
}

代码示例来源:origin: jboss-remoting/jboss-marshalling

/** {@inheritDoc} */
public void writeBytes(final String str) throws IOException {
  oos.writeBytes(str);
}

代码示例来源:origin: jboss-remoting/jboss-marshalling

/** {@inheritDoc} */
public void writeBytes(final String str) throws IOException {
  oos.writeBytes(str);
}

代码示例来源:origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public void writeBytes(@NotNull String s) throws IOException {
  oos.writeBytes(s);
}

代码示例来源:origin: EngineHub/CommandHelper

@Override
public void writeBytes(String str) throws IOException {
  super.writeBytes(str);
  super.flush();
}

代码示例来源:origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public void writeBytes(@NotNull String s) throws IOException {
  oos.writeBytes(s);
}

代码示例来源:origin: stackoverflow.com

try ( ObjectOutputStream oos = new ObjectOutputStream(
     new FileOutputStream( "CharToChar.txt" ) ) ) {
   // write any object to a file
   oos.writeObject( "I am Manish" );
   // another option, works for Strings and makes the String pretty much un-readable
   oos.writeBytes( "hello world" );
 } catch ( IOException e ) {
   e.printStackTrace();
 }

代码示例来源:origin: OpenAS2/OpenAs2App

out.writeBytes(en.nextElement() + "\r\n");
out.writeBytes("\r\n");

代码示例来源:origin: OpenAS2/OpenAs2App

out.writeBytes(en.nextElement() + "\r\n");
out.writeBytes(new String("\r\n"));

代码示例来源:origin: stackoverflow.com

ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeBytes(text);
oos.close();
fos.close();

相关文章

ObjectOutputStream类方法