### Question:
DocClient { private static void uploadFile(ClientBootstrap bootstrap, String host, int port, File file, String fileName, String thumbMark, String userName, String pwd) { URI uri = getUri(host, port); ChannelFuture future = bootstrap.connect(new InetSocketAddress(host, port)); Channel channel = future.awaitUninterruptibly().getChannel(); if (!future.isSuccess()) { future.getCause().printStackTrace(); bootstrap.releaseExternalResources(); return; } AbstractDocClientHandler handler = new UploadDocClientHandler(host, uri, file, fileName, thumbMark, userName, pwd); HttpRequest request = handler.getRequest(); HttpDataFactory factory = getHttpDataFactory(); HttpPostRequestEncoder bodyRequestEncoder = handler .wrapRequestData(factory); channel.write(request); if (bodyRequestEncoder.isChunked()) { channel.write(bodyRequestEncoder).awaitUninterruptibly(); } bodyRequestEncoder.cleanFiles(); channel.getCloseFuture().awaitUninterruptibly(); bootstrap.releaseExternalResources(); factory.cleanAllHttpDatas(); }  static String uploadFile(File file, String fileName,
                                    boolean thumbMark); static boolean deleteFile(String filePath, String userName,
                                     String pwd); static boolean deleteFile(String filePath); static boolean replaceFile(File file, String filePath); static boolean createThumbPicture(String filePath, String userName,
                                             String pwd); static boolean createThumbPicture(String filePath);  }### Answer:
@Test public void test() { DocClient.uploadFile(new File("C:\\06_temp\\psb.jpg"), "psb.jpg",false); }