java命名空间javax.imageio类imagewriter的类成员方法:
caninsertempty定义及介绍
本文导语:
caninsertempty
public boolean caninsertempty(int imageindex)
throws ioexception
如果 writer 支持在给定索引处插入新的空图像,则返回 true。图像的像素值是不确定的,并且可以使用 replacepixels 方法各个部分地指定它们。索引等...
caninsertempty
public boolean caninsertempty(int imageindex)
throws ioexception
- 如果 writer 支持在给定索引处插入新的空图像,则返回
true。图像的像素值是不确定的,并且可以使用 replacepixels 方法各个部分地指定它们。索引等于或大于插入索引的现有图像会将其索引加 1。值为 -1 的 imageindex 可用于表示大于当前最大索引的索引。
不支持插入空图像的 writer 可以返回 false,而不必对索引执行范围检查。
如果输出为 null,则默认实现抛出 illegalstateexception,否则返回 false,而不必检查 imageindex 的值。
- 参数:
imageindex - 将在其所在位置处插入图像的索引。
- 返回:
- 如果可以在给定索引处插入空图像,则返回
true。
- 抛出:
illegalstateexception - 如果尚未设置输出。
indexoutofboundsexception - 如果 writer 在一般情况下支持插入空图像,但 imageindex 小于 -1 或大于最大可用索引。
ioexception - 如果在查询期间发生 i/o 错误。