当前位置:网站首页>Scala IO reads binary files
Scala IO reads binary files
2022-06-24 23:38:00 【Jue Niu thunder plough hot blade】
import java.io.{
File, FileInputStream}
object D05_ Read binary {
def main(args: Array[String]): Unit = {
val file = new File("./data/4.png")
val fis = new FileInputStream(file)
// val buf = new Array[Byte](file.length().toInt) // Writing at work
val buf = new Array[Byte](888888)
val len = fis.read(buf)
println(" Number of valid bytes read :" + len)
println(" The length of the byte array :" + buf.length)
}
}
4.png
4.png Location 
边栏推荐
- 抖音实战~实现App端视频上传与发布
- 379. hide and seek
- throttle-debounce.js:一个小型的防抖节流函数库
- Tiktok practice ~ project associated unicloud
- golang convert map to json string
- Morris traversal
- R language uses GLM function to build Poisson log linear regression model, processes three-dimensional contingency table data to build saturation model, uses summary function to obtain model summary s
- The R language uses the matchit package for propensity matching analysis and match The data function constructs the matched sample set, and judges the balance of all covariates in the sample after the
- 376. 机器任务
- 7-5 maximal submatrix sum problem
猜你喜欢

7-6 laying oil well pipeline

Yyds dry goods counting uses xshell to implement agent function

抖音实战~发布短视频流程梳理

Stm32f030f4 reading infrared remote control data

Ethernet ARP Protocol

Morris遍曆

QT display RGB data

Volcano becomes spark default batch scheduler

Ningde times will increase RMB 45billion: Hillhouse subscribes RMB 3billion and Zeng Yuqun still controls 23% of the equity

Using ADC to control brushless motor source program STM32 library function
随机推荐
22map introduction and API
[JS] - [tree] - learning notes
7-2 后序+中序序列构造二叉树
7-8 circular scheduling problem
安装IBM CPLEX学术版 academic edition | conda 安装 CPLEX
Unveiling the secrets of the Winter Olympics | smartbi's partners supported the "front and back" of the Beijing Winter Olympics
Helix distance of point
R语言使用MASS包的polr函数构建有序多分类logistic回归模型、使用exp函数、confint函数、coef函数获取模型中每个变量(自变量改变一个单位)对应的优势比的置信区间
Jetpack Compose 最新进展
Mirror image of sword finger offer binary tree
Uninstall hero League
Selective sort method
【UVM入门 ===> Episode_8 】~ Sequence 和 Sequencer、Sequence 层次化
Hyperledger Fabric 2. X dynamic update smart contract
抖音实战~发布短视频流程梳理
Leetcode topic [array] -39- combined sum
7-7 求解众数问题
2021-2022中国金融数字化“新”洞察行业研究报告
Basic data type
还在用 SimpleDateFormat 做时间格式化?小心项目崩掉