当前位置: 首页 > news >正文

Ali MaxCompute SDK

ALI MC 文件读写
    public abstract BufferedInputStream readResourceFileAsStream(String var1) throws IOException;

LocalExecutionContext.java

  @Overridepublic BufferedInputStream readResourceFileAsStream(String resourceName) throws IOException {try {return wareHouse.readResourceFileAsStream(wareHouse.getOdps().getDefaultProject(),resourceName, ',');} catch (OdpsException e) {throw new IOException(e.getMessage());}}

WareHouse.java

  public BufferedInputStream readResourceFileAsStream(String project, String resource,char inputColumnSeperator)throws IOException, OdpsException {if (!existsResource(project, resource)) {DownloadUtils.downloadResource(WareHouse.getInstance().getOdps(), getOdps().getDefaultProject(), resource, getLimitDownloadRecordCount(), inputColumnSeperator);}if (!existsResource(project, resource)) {throw new OdpsException("File Resource " + project + "." + resource + " not exists");}File file = getReourceFile(project, resource);if (!file.isFile()) {throw new OdpsException("Resource " + project + "." + resource+ " is not a valid file Resource, because it is a direcotry");}return new BufferedInputStream(new FileInputStream(file));}
JDK BufferedInputStream
/*** A <code>BufferedInputStream</code> adds* functionality to another input stream-namely,* the ability to buffer the input and to* support the <code>mark</code> and <code>reset</code>* methods. When  the <code>BufferedInputStream</code>* is created, an internal buffer array is* created. As bytes  from the stream are read* or skipped, the internal buffer is refilled* as necessary  from the contained input stream,* many bytes at a time. The <code>mark</code>* operation  remembers a point in the input* stream and the <code>reset</code> operation* causes all the  bytes read since the most* recent <code>mark</code> operation to be* reread before new bytes are  taken from* the contained input stream.** @author  Arthur van Hoff* @since   JDK1.0*/
public
class BufferedInputStream extends FilterInputStream {private static int DEFAULT_BUFFER_SIZE = 8192;
http://www.lryc.cn/news/188765.html

相关文章:

  • 解决element中table在页面切换时候表格底部出现空白
  • Vue中对路由的进阶学习
  • Vuex的同步存值与取值及异步请求
  • 【Python爬虫 js渲染思路一】
  • 智慧安防AI视频智能分析云平台EasyCVR加密机授权小tips
  • C# Windows 窗体控件中的边距和填充
  • 腾讯云2核4G轻量服务器5M带宽支持多少人同时在线?
  • 01 初识FPGA
  • 设备巡检管理系统与隐患排查治理
  • linux之cpu模拟负载程序
  • zookeeper节点数据类型介绍及集群搭建
  • Spring: @ComponentScan注解,不设置basePackages时,为什么会扫描该注解所在的包?
  • DiffusionDet:第一个用于物体检测的扩散模型(DiffusionDet: Diffusion Model for Object Detection)
  • ④. GPT错误:导入import pandas as pd库,存储输入路径图片信息存储错误
  • 和鲸 ModelWhale 与华为 OceanStor 2910 计算型存储完成兼容性测试
  • c++中单例模式的实现和问题
  • 如何选购高效便捷的软件行业项目管理系统
  • 用“和美”丈量中国丨走进酒博物馆系列⑨
  • 树莓派 Raspberry Pi 与YOLOv8 结合进行目标检测
  • centos 安装 percona-xtrabackup
  • 机器学习1:k 近邻算法
  • 知识图谱系列4:neo4j学习
  • Mainflux IoT:Go语言轻量级开源物联网平台,支持HTTP、MQTT、WebSocket、CoAP协议
  • 怎样提取视频中的音频?分享一个一学就会的方法~
  • 【数据结构】二叉树的基本概念
  • 数据可视化实战:如何给毛*易的歌曲做词云展示?
  • 智能文本纠错API的崭露头角:革命性的写作辅助工具
  • 读书笔记:多Transformer的双向编码器表示法(Bert)-3
  • jpsall脚本
  • Django REST framework API版本管理【通过GET参数传递】