日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯(lián)網營銷解決方案
創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSObjectInput

ObjectInput

沛縣網站建設公司創(chuàng)新互聯(lián),沛縣網站設計制作,有大型網站制作公司豐富經驗。已為沛縣上千余家提供企業(yè)網站建設服務。企業(yè)網站搭建\成都外貿網站制作要多少錢,請找那個售后服務好的沛縣做網站的公司定做!

public interface ObjectInput
extends DataInput, AutoCloseable

ObjectInput 擴展了 DataInput 接口以包括對象的讀取。 DataInput 包括用于輸入原始類型的方法,ObjectInput 擴展了該接口以包括對象、數(shù)組和字符串。

Since:

JDK1.1

方法總結

修飾符和類型 方法 描述
intavailable()返回可以在不阻塞的情況下讀取的字節(jié)數(shù)。
voidclose()關閉輸入流。
intread()讀取一個字節(jié)的數(shù)據(jù)。
intread(byte[] b)讀入一個字節(jié)數(shù)組。
intread(byte[] b, int off, int len)讀入一個字節(jié)數(shù)組。
ObjectreadObject()讀取并返回一個對象。
longskip(long n)跳過 n 個字節(jié)的輸入。
從接口 java.io.DataInput 繼承的方法
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes

方法詳情

readObject

Object readObject() throws ClassNotFoundException, IOException

讀取并返回一個對象。 實現(xiàn)此接口的類定義了從何處“讀取”對象。

返回:

從流中讀取的對象

Throws:

Throw名稱 Throw描述
ClassNotFoundException如果找不到序列化對象的類。
IOException如果發(fā)生任何常見的輸入/輸出相關異常。

read

int read() throws IOException

讀取一個字節(jié)的數(shù)據(jù)。 如果沒有可用的輸入,此方法將阻塞。

返回:

讀取的字節(jié),如果到達流的末尾,則為 -1。

Throws:

Throw名稱 Throw描述
IOException如果發(fā)生 I/O 錯誤。

read

int read(byte[] b) throws IOException

讀入一個字節(jié)數(shù)組。 此方法將阻塞,直到某些輸入可用。

參數(shù):

參數(shù)名稱 參數(shù)描述
b讀取數(shù)據(jù)的緩沖區(qū)

返回:

實際讀取的字節(jié)數(shù),到達流末尾時返回-1。

Throws:

Throw名稱 Throw描述
IOException如果發(fā)生 I/O 錯誤。

read

int read(byte[] b, int off, int len) throws IOException

讀入一個字節(jié)數(shù)組。 此方法將阻塞,直到某些輸入可用。

參數(shù):

參數(shù)名稱 參數(shù)描述
b讀取數(shù)據(jù)的緩沖區(qū)
off數(shù)據(jù)的起始偏移量
len讀取的最大字節(jié)數(shù)

返回:

實際讀取的字節(jié)數(shù),到達流末尾時返回-1。

Throws:

Throw名稱 Throw描述
IOException如果發(fā)生 I/O 錯誤。

skip

long skip(long n) throws IOException

跳過 n 個字節(jié)的輸入。

參數(shù):

參數(shù)名稱 參數(shù)描述
n要跳過的字節(jié)數(shù)

返回:

跳過的實際字節(jié)數(shù)。

Throws:

Throw名稱 Throw描述
IOException如果發(fā)生 I/O 錯誤。

available

int available() throws IOException

返回可以在不阻塞的情況下讀取的字節(jié)數(shù)。

返回:

可用字節(jié)數(shù)。

Throws:

Throw名稱 Throw描述
IOException如果發(fā)生 I/O 錯誤。

close

void close() throws IOException

關閉輸入流。 必須調用以釋放與流關聯(lián)的任何資源。

指定者:

在接口 AutoCloseable 中關閉

Throws:

Throw名稱 Throw描述
IOException如果發(fā)生 I/O 錯誤。

本文題目:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSObjectInput
文章網址:http://www.5511xx.com/article/cohpigs.html