Java 日看一类(10)之IO包中的DataInput接口

17|CI/CD 集成与质量门禁:让精准测试进入发布流水线 本文讲解精准测试如何接入 CI/CD 流水线,并通过质量门禁辅助发布决策。测试开发工程师。Java 后端开发工程师。质量平台 / DevOps 平台建设者。想了解精准测试落地方法的技术负责人。 阅读详情

DataInput接口没有引入的包或继承的类;

接口注释如下:

/**
 * The {@code DataInput} interface provides
 * for reading bytes from a binary stream and
 * reconstructing from them data in any of
 * the Java primitive types. There is also
 * a
 * facility for reconstructing a {@code String}
 * from data in
 * <a href="#modified-utf-8">modified UTF-8</a>
 * format.
 * <p>
 * It is generally true of all the reading
 * routines in this interface that if end of
 * file is reached before the desired number
 * of bytes has been read, an {@code EOFException}
 * (which is a kind of {@code IOException})
 * is thrown. If any byte cannot be read for
 * any reason other than end of file, an {@code IOException}
 * other than {@code EOFException} is
 * thrown. In particular, an {@code IOException}
 * may be thrown if the input stream has been
 * closed.
 *
 * <h3><a name="modified-utf-8">Modified UTF-8</a></h3>
 * <p>
 * Implementations of the DataInput and DataOutput interfaces represent
 * Unicode strings in a format that is a slight modification of UTF-8.
 * (For information regarding the standard UTF-8 format, see section
 * <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version
 * 4.0</i>).
 * Note that in the following table, the most significant bit appears in the
 * far left-hand column.
 *
 * <blockquote>
 *   <table border="1" cellspacing="0" cellpadding="8"
 *          summary="Bit values and bytes">
 *     <tr>
 *       <th colspan="9"><span style="font-weight:normal">
 *         All characters in the range {@code '\u005Cu0001'} to
 *         {@code '\u005Cu007F'} are represented by a single byte:</span></th>
 *     </tr>
 *     <tr>
 *       <td></td>
 *       <th colspan="8" id="bit_a">Bit Values</th>
 *     </tr>
 *     <tr>
 *       <th id="byte1_a">Byte 1</th>
 *       <td><center>0</center>
 *       <td colspan="7"><center>bits 6-0</center>
 *     </tr>
 *     <tr>
 *       <th colspan="9"><span style="font-weight:normal">
 *         The null character {@code '\u005Cu0000'} and characters
 *         in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
 *         represented by a pair of bytes:</span></th>
 *     </tr>
 *     <tr>
 *       <td></td>
 *       <th colspan="8" id="bit_b">Bit Values</th>
 *     </tr>
 *     <tr>
 *       <th id="byte1_b">Byte 1</th>
 *       <td><center>1</center>
 *       <td><center>1</center>
 *       <td><center>0</center>
 *       <td colspan="5"><center>bits 10-6</center>
 *     </tr>
 *     <tr>
 *       <th id="byte2_a">Byte 2</th>
 *       <td><center>1</center>
 *       <td><center>0</center>
 *       <td colspan="6"><center>bits 5-0</center>
 *     </tr>
 *     <tr>
 *       <th colspan="9"><span style="font-weight:normal">
 *         {@code char} values in the range {@code '\u005Cu0800'}
 *         to {@code '\u005CuFFFF'} are represented by three bytes:</span></th>
 *     </tr>
 *     <tr>
 *       <td></td>
 *       <th colspan="8"id="bit_c">Bit Values</th>
 *     </tr>
 *     <tr>
 *       <th id="byte1_c">Byte 1</th>
 *       <td><center>1</center>
 *       <td><center>1</center>
 *       <td><center>1</center>
 *       <td><center>0</center>
 *       <td colspan="4"><center>bits 15-12</center>
 *     </tr>
 *     <tr>
 *       <th id="byte2_b">Byte 2</th>
 *       <td><center>1</center>
 *       <td><center>0</center>
 *       <td colspan="6"><center>bits 11-6</center>
 *     </tr>
 *     <tr>
 *       <th id="byte3">Byte 3</th>
 *       <td><center>1</center>
 *       <td><center>0</center>
 *       <td colspan="6"><center>bits 5-0</center>
 *     </tr>
 *   </table>
 * </blockquote>
 * <p>
 * The differences between this format and the
 * standard UTF-8 format are the following:
 * <ul>
 * <li>The null byte {@code '\u005Cu0000'} is encoded in 2-byte format
 *     rather than 1-byte, so that the encoded strings never have
 *     embedded nulls.
 * <li>Only the 1-byte, 2-byte, and 3-byte formats are used.
 * <li><a href="../lang/Character.html#unicode">Supplementary characters</a>
 *     are represented in the form of surrogate pairs.
 * </ul>
 * @author  Frank Yellin
 * @see     java.io.DataInputStream
 * @see     java.io.DataOutput
 * @since   JDK1.0
 */

大意如下:

该接口用于从二进制流中读取字节,并根据的所有基本类型对其进行重构

同时也可以根据修改版UTF-8的格式重构字符串

如果在被请求的byte数目被读取之前就读取到文件末尾,一个文件结束事件(EOFException)将会被抛出

如果在文件结束之前由于各种原因不能读取文件,一个除了EOFException意外的IO异常将会被抛出

尤其当输入流关闭后将会抛出一个IO异常

修改版UTF-8:(注释里面插标签语言真是看的头疼)





本接口规定了15个方法:

传入缓冲区数组的readFully



传入缓冲区数组、读取指针、读取长度的readFully



跳过输入流后续n个字符的skipBytes




读入输入字符对其进行条件检测的readBoolean



读取输入流中单个字节(有符号返回



读取输入流中单个字节(无符号返回



读取输入流中两个字节(有符号返回



读取输入流中两个字节(无符号返回



读取两个字节并转化为字符类型



读取四个字节返回int值



读取八个字节返回long值



读取四个字节返回float值



读取8个字节返回double



读入单行文本


读入修改版UTF-8,返回字符串




说实话,接口难以去分析什么(毕竟没有源码,只能看看注释)闭嘴,看注释不如直接翻看文档尴尬,不过接口也必须要学习,有助理解许多完成该接口的类的功能。



大模型——Coze工作流实战:一键生成像素风格视频 本文介绍了如何利用Coze平台工作流生成像素风格心理学短视频的方法。通过创建工作流、设置变量节点、调用大模型生成文案、数据格式化处理、合成音频、生成字幕等步骤,最终实现从输入主题到生成完整视频的自动化流程。文章详细展示了每个节点的具体配置方法,包括提示词编写和数据处理脚本,为读者提供了完整的像素风格视频制作解决方案。 阅读详情

相关推荐

数字图像处理基础实验(二):直方图均衡化

一、实验内容及原理 1、计算灰度图像的归一化直方图 具体内容:利用 OpenCV 对图像像素进行操作,计算归一化直方图.并在 窗口中以图形的方式显示出来 步骤: (1)初始化一个256大小的数组,存放图像中每级灰度值的像素点的个数 (2)遍历整张图像 (3)归一化数组 2、灰度图像直方图均衡处理 具体内容:通过计算归一化直方图,设计算法实现直方图均衡化处理。 步骤: (1)读取该像素点的灰度值 (...

lyd1995的博客 4528

datainput java_java IO笔记(DataInput/DataOutput)

本篇将要讲述的内容是java io中的DataInput 和 DataOutput。就像前面讲述的RandomAccessFile一样,它实现的就是这两个接口,这两个接口分别提供了从流中读取二进制数据转化为java基本数据和向流中写入由java基本数据转成的二进制数据,功能十分强大。下面还是先贴上源码,因为是接口,其中方法都是抽象方法,也就简单说说。DataInput.java:package j...

weixin_36019798的博客 539

Excel-MCP实战指南:零代码实现大模型与Excel的智能交互

本文详细介绍了Excel-MCP工具如何实现大模型与Excel的无缝交互,无需编写代码即可完成数据读写、图表生成等复杂操作。通过实战案例展示了Excel-MCP在销售报表自动化、财务对账等企业级场景中的应用,大幅提升工作效率。文章还提供了安装指南、核心功能解析和常见问题解决方案。

weixin_29212429的博客 434

Java中对输入输出的常用操作

介绍java常用的输入输出方式

m0_51977744的博客 1734

安卓7.0+抓包难题:雷电模拟器9.0+Charles系统证书安装全攻略

HTTPS协议通过SSL/TLS加密保障网络通信安全,其核心机制依赖于证书信任链。在Android系统中,自7.0版本起,谷歌收紧了证书信任策略,默认仅信任系统预置的CA证书,这直接导致了传统抓包方法失效。理解这一原理对于移动开发、测试及安全研究至关重要,它揭示了应用层安全策略与系统底层机制的关联。通过将用户证书安装至系统信任区,可以突破此限制,实现HTTPS流量的解密与分析。这一技术在App调试、接口测试、安全审计等场景中具有广泛的应用价值。本文以雷电模拟器9.0和Charles抓包工具为例,详细演示了如

weixin_42521843的博客 280

AMD MI50 Linux ROCm 6.4 手动编译与大模型推理实战

GPU加速计算是现代AI推理的核心基础,其性能依赖于硬件架构、驱动栈与运行时环境的深度协同。ROCm作为AMD开源GPU计算平台,采用‘自下而上’的Linux生态集成路径,强调对上游内核、编译器与固件的强耦合。MI50基于Vega 20(gfx900)架构,虽具备32GB HBM2高带宽显存与14.7 TFLOPS FP16算力,但因ROCm官方支持策略转向CDNA架构,自6.5版本起被移出支持列表,仅ROCm 6.4仍提供实验性兼容——这使其成为Linux下部署私有大模型的关键‘最后一班船’。本文围绕MI

weixin_32770423的博客 370

java学习input_1

学习input

zlyllx的博客 2812

让 AI 变聪明的 20 条指令:如何让大模型回答得更精准、更专业、更实事求是

让 AI 变聪明,本质上不是写几句神奇咒语,而是把你的任务表达得更清楚,把事实标准设得更严格,把输出格式规定得更明确,把不确定性管理得更认真,把历史对话利用得更充分。大模型的强项是语言生成、信息组织、模式归纳和方案扩展;弱项是事实核验、实时更新、责任判断和对模糊意图的准确猜测。好的指令,就是在用人的判断弥补模型的弱点,让模型把强项发挥在正确的地方。

Sumarua的博客 1523

Java DataInput接口总结

版本 JDK8(JDK1.8) DataInput接口源码重点 1.DataInput接口提供了从二进制流中读取字节并从中重构任何Java类型的数据的功能,与之对应的是DataOutput,DataOutput接口定义了一系列方法用于将任何Java类型的数据转换为一系列字节,并将这些字节写入二进制Data DataOutput源码可以看我这篇文章 DataOutput 2.DataInput接口的 void readFully(byte b[]) 方法是一个会阻塞方法,一直阻塞到从二进制流中读取字节填满传入

weixin_45754452的博客 910

ECC椭圆曲线加解密原理详解(配图)

椭圆曲线加解密原理详解 本文主要参照:ECC椭圆曲线详解(有具体实例)[1] 前言: 椭圆曲线(ECC)加密原理跟RSA加解密原理比起来,可真是晦涩难懂。拜读了大神Kalafinaian文章“ECC椭圆曲线详解(有具体实例)”,终于看到了参透的曙光。 由于原文中有微小的瑕疵,也为了便于阅读起来更加流畅,我重新整理了一下这篇文章。 为什么使用椭圆曲线加密算法? RSA的解决分解整数问题需要亚指数...

Mark的博客 7万+

《电磁兼容设计》专栏说明

本专栏自2024年1月起开始更新,仅设此一个电磁兼容相关知识专栏,并将一直持续更新下去,无期限

linkking27的博客 794

java的inputstream_java中inputstream的使用

java中的inputstream是一个面向字节的流抽象类,其依据详细应用派生出各种详细的类。比方FileInputStream就是继承于InputStream,专门用来读取文件流的对象,其详细继承结构如图我们发现。是从抽象类InputStream继承而来的。我们继续看样例,实现从txt文件里。读取字符。当中test.txt已经提前新建好。放到project文件夹下了。package com.it...

weixin_32641435的博客 9986

【webrtc】openh264编码:动态配置码控参数触发IDR编码

SetRates 下发RateControlParameters 给到openh264 编码器 void SetRates(const RateControlParameters& parameters) override; LayerConfig 编码器这边的配置是layerconfig,具体到层的: std::vector<LayerConfig> configurations_; void H264EncoderImpl::SetRates(const RateCo.

突围 726

java IO笔记(DataInput/DataOutput)

本篇将要讲述的内容是java io中的DataInput 和 DataOutput。

moonfish0607的博客 3286

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

java.io接口——dataInput和dataOutput

dataInput 共15个接口,2个读取方法(一个全读,一个读写指定位置),1个跳过的方法。10个读取基本字节的方法(boolean,byte,short,char,int,long,float,double,两个UnsignedByte,UnsignedShort,不带正负号的)1个读取一行,1个读取utf-8字符串 void readFully(byte b[]) throws IOEx...

一剑轻语 1314

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

Java 日看一类(35)之IO包中的ObjectInput接口

该接口继承自DataInput、AutoCloseable接口该接口的类头注释如下:/** * ObjectInput extends the DataInput interface to include the reading of * objects. DataInput includes methods for the input of primitive types, * Objec...

github_37666068的博客 367

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

(每日持续更新)jdk api之DataInput基础、应用、实战

java.ioDataInput以下是DataInput从输入流中读取字节数组,并将其存储到指定的字节数组b中。从输入流中读取指定长度的字节数组,并将其存储到指定的字节数组b中,从数组的偏移位置off开始。从输入流中读取一个布尔值。从输入流中读取一个字节。从输入流中读取一个无符号字节,将其作为int返回。从输入流中读取一个短整数。从输入流中读取一个无符号短整数,将其作为int返回。从输入流中读取一个字符。从输入流中读取一个整数。从输入流中读取一个长整数。从输入流中读取一个单精度浮点数。

a89879193的专栏 1358

(一)java.io.DataInput接口及源码详解

简介:java.io.DataInput接口提供用于读取二进制流字节并重建为任何java原始数据类型,也提供了一个转换为UTF-8编码的字符串类型方法; 一般来说,这个接口的所有读取方法都是正确的,如果在读取所需字节数之前到达文件末尾,将会抛出EOFException(也就是IOException异常的一种)异常。如果除了到达文件末尾不能读取字节的原因,不会抛出IOException 异常而会抛...

OceanSky的专栏 4963

JDK8 API——java.io.DataInput

java.io   public interface DataInput DataInput接口提供了从二进制流读字节数据并重建数据为任何Java原始类型的功能,也提供了修改utf8格式编码 的数据为String类型。

Syes_lei的博客 2780

Java基础 IO流中涉及的接口简介

IO或继承或实现或使用的接口以及类

骑牛小道士 851

接口 DataInput

java.io 接口 DataInput 所有已知子接口:ImageInputStream, ImageOutputStream, ObjectInput所有已知实现类:DataInputStream, FileCacheImageInputStream, FileCacheImageOutputStream, FileImageInputStream, FileImageOutpu...

angji2879的博客 335

java inputdata类_DataInput接口说明及其实现类

一. DataInput接口DataInput接口提供了一系列的方法从二进制流中读取字节,并将读取出来的字节转换成任意的java基本类型,包括转换成UTF-8类型的字符串。该接口中主要方法介绍如下:(1)void readFully(byte b[]) throws IOException;从input stream中读取b.length长度的字节,并将其存储到b中。@Testpublic v...

weixin_39754831的博客 869

Java 日看一类(11)之IO包中的DataInputStream类

该类没有引入外界包继承了FilterInputStream完成了上篇文章所讲到的DataInput接口类头注释/** * A data input stream lets an application read primitive Java data * types from an underlying input stream in a machine-independent * way....

github_37666068的博客 424

java.io 包

java.io 通过数据流、序列化和文件系统提供系统输入和输出。 请参见: 接口摘要 Closeable Closeable 是可以关闭的数据源或目标。 DataInput DataInput 接口用于从二进制流中读取字节,并根据所有 Java 基本类型数据进行重构。 DataOutput DataOutput 接...

angji2879的博客 160

JAVA mac系统io文件流,JAVA常用包之java.io文件流

学习目的了解java.io包的含义和作用学会查看java.io包下类和接口的底层源码实现掌握java.io包的常用接口和类,以及常用的方法四、java.io概念通过数据流、序列化和文件系统提供系统输入和输出。流是java文件和计算机底层进行交流的一种方式、形式,计算机只认识二进制的补码。流的形式写入:硬盘文件-->译成字节码-->二进制流-->字节解码-->内存文件写出:内...

weixin_39925031的博客 401

【jdk包系列】jdk源码包 java.io详解

包 java.io 描述通过数据流、序列化和文件系统提供系统输入和输出。除非另有说明,在此包中的任何类或接口的构造函数或方法中将 null 参数传递给会导致抛出 NullPointerException。

wang2leee的博客 330
上一篇: Java 日看一类(9)之IO包中的CharConversionException类和Console类
下一篇: Java 日看一类(11)之IO包中的DataInputStream类
wyf95278
博客等级 码龄10年 38粉丝 71原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值