io.advantageous.boon.core.IO.write()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(101)

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

IO.write介绍

暂无

代码示例

代码示例来源:origin: advantageous/qbit

private static URLConnection doPost(String url, Map<String, ?> headers,
                  String contentType, String charset, String body
) throws IOException {
  HttpURLConnection connection;/* Handle output. */
  connection = (HttpURLConnection) new URL(url).openConnection();
  connection.setConnectTimeout(DEFAULT_TIMEOUT_SECONDS * 1000);
  connection.setDoOutput(true);
  manageContentTypeHeaders(contentType, charset, connection);
  manageHeaders(headers, connection);
  IO.write(connection.getOutputStream(), body, IO.DEFAULT_CHARSET);
  return connection;
}

代码示例来源:origin: advantageous/qbit

private static URLConnection doPut(String url, Map<String, ?> headers,
                  String contentType, String charset, String body
) throws IOException {
  HttpURLConnection connection;/* Handle output. */
  connection = (HttpURLConnection) new URL(url).openConnection();
  connection.setConnectTimeout(DEFAULT_TIMEOUT_SECONDS * 1000);
  connection.setRequestMethod("PUT");
  connection.setDoOutput(true);
  manageContentTypeHeaders(contentType, charset, connection);
  manageHeaders(headers, connection);
  if (!(body == null || body.isEmpty())) {
    IO.write(connection.getOutputStream(), body, IO.DEFAULT_CHARSET);
  }
  return connection;
}

代码示例来源:origin: advantageous/qbit

IO.write(connection.getOutputStream(),
    new String(buf.readForRecycle(), 0, len, StandardCharsets.UTF_8), IO.DEFAULT_CHARSET);
return connection;

代码示例来源:origin: advantageous/qbit

private void write(List<EndpointDefinition> fooServices) throws Exception {
  JsonSerializer jsonSerializer = new JsonSerializerFactory().create();
  String json = jsonSerializer.serialize(fooServices).toString();
  File outputFile = new File(dir, "fooBar.json");
  IO.write(outputFile.toPath(), json);
}

代码示例来源:origin: com.github.advantageous/boon-reflekt

public static void output( Path file, byte[] bytes ) {
  IO.write( file, bytes );
}

代码示例来源:origin: io.advantageous.boon/boon-reflekt

public static void output( Path file, byte[] bytes ) {
  IO.write( file, bytes );
}

代码示例来源:origin: io.advantageous.boon/boon-reflekt

public static void write( String file, byte[] contents ) {
  write (path(file), contents);
}

代码示例来源:origin: io.advantageous.boon/boon-reflekt

public static void output( String file, byte[] bytes ) {
  IO.write( path(file), bytes );
}

代码示例来源:origin: com.github.advantageous/boon-reflekt

public static void write( String file, String contents ) {
  write( path(file), contents.getBytes( DEFAULT_CHARSET ) );
}

代码示例来源:origin: com.github.advantageous/boon-reflekt

public static void write( String file, byte[] contents ) {
  write (path(file), contents);
}

代码示例来源:origin: com.github.advantageous/qbit-core

private static URLConnection doPut( String url, Map<String, ?> headers,
                   String contentType, String charset, String body
) throws IOException {
  HttpURLConnection connection;/* Handle output. */
  connection = ( HttpURLConnection ) new URL( url ).openConnection();
  connection.setConnectTimeout( DEFAULT_TIMEOUT_SECONDS * 1000 );
  connection.setRequestMethod("PUT");
  connection.setDoOutput( true );
  manageContentTypeHeaders( contentType, charset, connection );
  manageHeaders( headers, connection );
  IO.write(connection.getOutputStream(), body, IO.DEFAULT_CHARSET);
  return connection;
}

代码示例来源:origin: advantageous/qbit

IO.write(thisImage.toPath(), body);
})
.build();

代码示例来源:origin: io.advantageous.qbit/qbit-core

private static URLConnection doPost(String url, Map<String, ?> headers,
                  String contentType, String charset, String body
) throws IOException {
  HttpURLConnection connection;/* Handle output. */
  connection = (HttpURLConnection) new URL(url).openConnection();
  connection.setConnectTimeout(DEFAULT_TIMEOUT_SECONDS * 1000);
  connection.setDoOutput(true);
  manageContentTypeHeaders(contentType, charset, connection);
  manageHeaders(headers, connection);
  IO.write(connection.getOutputStream(), body, IO.DEFAULT_CHARSET);
  return connection;
}

代码示例来源:origin: com.github.advantageous/qbit-core

private static URLConnection doPost( String url, Map<String, ?> headers,
                   String contentType, String charset, String body
) throws IOException {
  HttpURLConnection connection;/* Handle output. */
  connection = ( HttpURLConnection ) new URL( url ).openConnection();
  connection.setConnectTimeout( DEFAULT_TIMEOUT_SECONDS * 1000 );
  connection.setDoOutput( true );
  manageContentTypeHeaders( contentType, charset, connection );
  manageHeaders( headers, connection );
  IO.write(connection.getOutputStream(), body, IO.DEFAULT_CHARSET);
  return connection;
}

代码示例来源:origin: io.advantageous.boon/boon-util

private static URLConnection doPost( String url, Map<String, ?> headers,
                   String contentType, String charset, String body
) throws IOException {
  HttpURLConnection connection;/* Handle output. */
  connection = ( HttpURLConnection ) new URL( url ).openConnection();
  connection.setConnectTimeout( DEFAULT_TIMEOUT_SECONDS * 1000 );
  connection.setDoOutput( true );
  manageContentTypeHeaders( contentType, charset, connection );
  manageHeaders( headers, connection );
  IO.write(connection.getOutputStream(), body, IO.DEFAULT_CHARSET);
  return connection;
}

代码示例来源:origin: io.advantageous.boon/boon-reflekt

public static void writeChild( Path parentDir, String childFileName, String childContents ) {
  try {
    final Path newFilePath = path( parentDir.toString(),
        childFileName );
    write( newFilePath, childContents );
  } catch ( Exception ex ) {
    Exceptions.handle( ex );
  }
}

代码示例来源:origin: com.github.advantageous/boon-reflekt

public static void writeChild( Path parentDir, String childFileName, String childContents ) {
  try {
    final Path newFilePath = path( parentDir.toString(),
        childFileName );
    write( newFilePath, childContents );
  } catch ( Exception ex ) {
    Exceptions.handle( ex );
  }
}

代码示例来源:origin: io.advantageous.boon/boon-json

@Override
public void writeValue( File dest, Object value ) {
  IO.write( Paths.get(dest.toString()), serializerFactory.create().serialize(value).toString());
}

代码示例来源:origin: com.github.advantageous/boon-json

@Override
public void writeValue( File dest, Object value ) {
  IO.write( Paths.get(dest.toString()), serializerFactory.create().serialize(value).toString());
}

代码示例来源:origin: io.gatling.advantageous.boon/boon-json

@Override
public void writeValue( File dest, Object value ) {
  IO.write( Paths.get(dest.toString()), serializerFactory.create().serialize(value).toString());
}

相关文章