Java ByteArrayInputStream markSupported()方法與示例

ByteArrayInputStream類markSupported()方法 (ByteArrayInputStream Class markSupported() method)

  • markSupported() method is available in java.util package.

    markSupported()方法在java.util包中可用。

  • markSupported() method is used to check whether this ByteArrayInputStream support mark() and reset() methods or not.

    markSupported()方法用于檢查此ByteArrayInputStream是否支持mark()和reset()方法。

  • markSupported() method is a non-static method, it is accessible with the class object only and if we try to access the method with the class name then we will get an error.

    markSupported()方法是一種非靜態方法,只能通過類對象訪問,如果嘗試使用類名稱訪問該方法,則會收到錯誤消息。

  • markSupported() method does not throw an exception at the time of checking supportive methods.

    在檢查支持方法時, markSupported()方法不會引發異常。

Syntax:

句法:

    public boolean markSupported();

Parameter(s):

參數:

  • It does not accept any parameter.

    它不接受任何參數。

Return value:

返回值:

The return type of the method is boolean, it returns true when this stream support mark() and reset() method otherwise it returns false.

該方法的返回類型為boolean ,當此流支持mark()和reset()方法時返回true,否則返回false。

Example:

例:

// Java program to demonstrate the example 
// of boolean markSupported() method of
// ByteArrayInputStream
import java.io.*;
public class MarkSupportedBAIS {
public static void main(String[] args) throws Exception {
byte[] by = {
97,
98,
98,
99
};
// Instantiates ByteArrayInputStream 
ByteArrayInputStream byte_s = new ByteArrayInputStream(by);
// By using markSupported() method check 
// whether this stream byte_s support
// mark() and reset() or not
boolean status = byte_s.markSupported();
System.out.println("byte_s.markSupported(): " + status);
byte_s.close();
}
}

Output

輸出量

byte_s.markSupported(): true

翻譯自: https://www.includehelp.com/java/bytearrayinputstream-marksupported-method-with-example.aspx

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/542459.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/542459.shtml
英文地址,請注明出處:http://en.pswp.cn/news/542459.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

markdown 流程圖_測試了12款Markdown編輯器,推薦一個最好用的!

有很多喜歡寫博客的小伙伴問我,這個代碼筆記的格式怎么弄的簡潔又好看,雖然csdn里面有Markdown的書寫模式,但是我還是想推薦一款比較好用的寫筆記的編輯器 - Typora。相信很多小伙伴都在使用吧,這個一直是我最喜歡的 markdown 編輯…

小程序 || 語句_C ++條件語句| 查找輸出程序| 套裝2

小程序 || 語句Program 1: 程序1&#xff1a; #include <iostream>#include <stdio.h>using namespace std;int main(){int num 0;num printf("%d ", printf("%d ", printf("ABC")));if (num 2) {cout << "INDIA&quo…

python爬取天氣預報源代碼_python抓取天氣并分析 實例源碼

【實例簡介】Python代碼抓取獲取天氣預報信息源碼講解。這是一個用Python編寫抓取天氣預報的代碼示例&#xff0c;用python寫天氣查詢軟件程序很簡單。這段代碼可以獲取當地的天氣和、任意城市的天氣預報&#xff0c;原理是根據url找到網站截取相應的數據展現。python抓取廣州天…

Linux編譯程序源碼環境,Linux下對nodejs環境進行源碼編譯并部署云應用

Node 是一個讓 JavaScript 運行在服務端的開發平臺&#xff0c;它讓 JavaScript 成為與PHP、Python、Perl、Ruby 等服務端語言平起平坐的腳本語言。該環境安裝非常簡單&#xff0c;這里簡單記錄下linux(centos環境下)的源碼安裝&#xff0c;做個記錄。平臺&#xff1a;centos 6…

endswith方法_帶有示例JavaScript字符串endsWith()方法

endswith方法字符串endsWith()方法 (String endsWith() Method) endsWith() method is a string method in JavaScript, it is used to check whether a string ends with a specified substring or not. EndsWith()方法是JavaScript中的字符串方法&#xff0c;用于檢查字符串是…

mysql多行合并成一行_數據文件合并與拆分

在數據處理業務中&#xff0c;經常要把文件結構相同或近似相同的數據文件合并成一個文件&#xff0c;或者將一個比較大的數據文件拆分成小的數據文件。本文將介紹文本文件和 Excel 文件合并及拆分會遇到的幾種情況&#xff0c;并提供用 esProc SPL 編寫的代碼示例。esProc 是專…

日期setMinutes()方法以及JavaScript中的示例

JavaScript日期setMinutes()方法 (JavaScript Date setMinutes() method) setMinutes() method is a Date class method, it is used to set the minutes to the Date object with a valid minutes value (between 00 to 59). setMinutes()方法是Date類的方法&#xff0c;用于將…

suse linux增加新磁盤分區,Virtualbox中Linux添加新磁盤并創建分區

引言&#xff1a;我們常常在使用系統的時候突然發現&#xff0c;哎呦~~~我們的磁盤空間不夠用啦&#xff01;我遇到常見的就是數據庫數據暴增&#xff0c;預留的空間沒有啦&#xff0c;只好新添加磁盤&#xff0c;在VB虛擬機上就可以實現&#xff0c;往往苦于沒有圖文并茂的好資…

Java SecurityManager checkMemberAccess()方法與示例

SecurityManager類的checkMemberAccess()方法 (SecurityManager Class checkMemberAccess() method) checkMemberAccess() method is available in java.lang package. checkMemberAccess()方法在java.lang包中可用。 In checkMemberAccess() method we access public members …

arcgis字段計算器無法賦值_Arcgis空間連接工具的妙用

?Arcgis功能真的無比強大&#xff0c;讀書時一般只會用到一些常見的&#xff0c;工作后挖掘了很多新功能&#xff0c;數據處理效率大幅提升&#xff0c;個人覺得arcgis是最強大最好用的gis軟件&#xff01;本節給大家分享下空間連接功能的兩個妙用。空間連接功能很多giser應該…

linux重裝hal服務安裝,linux ubuntu 安裝微信客戶端

下載(我的系統是32 位的)rootmarhal:/opt# wget https://github.com/geeeeeeeeek/electronic-wechat/releases/download/V2.0/linux-ia32.tar.gz解壓rootmarhal:/opt# tar xvf linux-ia32.tar.gz下載微信圖標移動到解壓目錄rootmarhal:/home/marhal/下載# mv wechat.ico /opt/e…

currency abap_Java Currency getDefaultFractionDigits()方法及示例

currency abap貨幣類getDefaultFractionDigits()方法 (Currency Class getDefaultFractionDigits() method) getDefaultFractionDigits() method is available in java.util package. getDefaultFractionDigits()方法在java.util包中可用。 getDefaultFractionDigits() method …

python爬蟲自動更換ip_Python 爬蟲使用動態切換ip防止封殺

對于爬蟲被封禁 &#xff01; 爬蟲一般來說只要你的ip夠多&#xff0c;是不容易被封的。 一些中小網站要封殺你&#xff0c;他的技術成本也是很高的&#xff0c;因為大多數網站沒有vps&#xff0c;他們用的是虛擬空間或者是sae&#xff0c;bae這樣的paas云。 其實就算他們不考慮…

linux nohup不生成日志,linux重定向及nohup不輸出的方法

FreeBSD可以同時運行多個進程&#xff0c;在shell下直接輸入命令后&#xff0c;shell將進程放到前臺執行。如果要將進程放到后臺執行&#xff0c;需要在命令行的結尾加上一個 “&” 符號。下面的命令從后臺執行&#xff0c;從ftp.isc.org下載文件。$ fetch ftp://ftp.isc.o…

Java BigInteger類| 帶實例的splitAndRemainder()方法

BigInteger類divideAndRemainder()方法 (BigInteger Class divideAndRemainder() method) divideAndRemainder() method is available in java.math package. splitAndRemainder()方法在java.math包中可用。 divideAndRemainder() method returns BigInteger array of 2 elemen…

SpringMVC Mybatis Shiro RestTemplate的實現客戶端無狀態驗證及訪問控制【轉】

2019獨角獸企業重金招聘Python工程師標準>>> A.首先需要搭建SpringMVCShiro環境 a1.pom.xml配置 spring: <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId><version>4.1.0.RELEAS…

sql服務器默認密碼_搭建一個DNS服務器,輕松實現域名解析內容分發,訪問速度提高N倍...

DNS服務器&#xff0c;Domain Name Server&#xff0c;域名解析服務器&#xff0c;互聯網上相互通信使用的是IP&#xff0c;但是IP是又長又臭又難記&#xff0c;所以創造了域名來解決IP難寫難記的問題&#xff0c;記一個g.cn比203.208.50.127強過不知多少倍了。有了域名&#x…

在C ++ STL中使用string :: to_string()將數字轉換為字符串

to_string() is a library function of <string> header, it is used to convert numeric value (number) to string. to_string()是<string>標頭的庫函數&#xff0c;用于將數值(數字)轉換為字符串。 Syntax: 句法&#xff1a; string to_string(numberic_value…

門級建模

學習目標 學習Verilog提供的門級原語 理解門的實例引用、門的符號以及and/or&#xff0c;buf/not類型的門的真值表 學習如何根據電路的羅技圖來生成Verilog描述 講述門級設計中的上升、下降和關斷延遲 解釋門級設計中的最小、最大和典型延遲 1.門的類型 1.1與門&#xff08;and…

linux .net 控制臺應用程序,VisualStudioCode創建的asp.net core控制臺程序部署到linux

1、asp.net core控制臺程序static void Main(string[] args){int times10;while(times>0){Console.WriteLine("Hello World!");times--;Thread.Sleep(1000);}}2、發布發布前&#xff0c;修改test2.csproj文件(項目名稱為test2)Exenetcoreapp2.1centos.7-x64主要添…