当前位置: 首页>>代码示例>>Java>>正文


Java FileItemStream.ItemSkippedException方法代码示例

本文整理汇总了Java中org.apache.commons.fileupload.FileItemStream.ItemSkippedException方法的典型用法代码示例。如果您正苦于以下问题:Java FileItemStream.ItemSkippedException方法的具体用法?Java FileItemStream.ItemSkippedException怎么用?Java FileItemStream.ItemSkippedException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.fileupload.FileItemStream的用法示例。


在下文中一共展示了FileItemStream.ItemSkippedException方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: read

import org.apache.commons.fileupload.FileItemStream; //导入方法依赖的package包/类
/**
 * Returns the next byte in the stream.
 *
 * @return The next byte in the stream, as a non-negative
 * integer, or -1 for EOF.
 * @throws IOException An I/O error occurred.
 */
@Override
public int read() throws IOException {
    if (closed) {
        throw new FileItemStream.ItemSkippedException();
    }
    if (available() == 0 && makeAvailable() == 0) {
        return -1;
    }
    ++total;
    int b = buffer[head++];
    if (b >= 0) {
        return b;
    }
    return b + BYTE_POSITIVE_OFFSET;
}
 
开发者ID:dueros,项目名称:dcs-sdk-java,代码行数:23,代码来源:MultipartStreamCopy.java

示例2: skip

import org.apache.commons.fileupload.FileItemStream; //导入方法依赖的package包/类
/**
 * Skips the given number of bytes.
 *
 * @param bytes Number of bytes to skip.
 * @return The number of bytes, which have actually been
 * skipped.
 * @throws IOException An I/O error occurred.
 */
@Override
public long skip(long bytes) throws IOException {
    if (closed) {
        throw new FileItemStream.ItemSkippedException();
    }
    int av = available();
    if (av == 0) {
        av = makeAvailable();
        if (av == 0) {
            return 0;
        }
    }
    long res = Math.min(av, bytes);
    head += res;
    return res;
}
 
开发者ID:dueros,项目名称:dcs-sdk-java,代码行数:25,代码来源:MultipartStreamCopy.java

示例3: read

import org.apache.commons.fileupload.FileItemStream; //导入方法依赖的package包/类
/**
 * Returns the next byte in the stream.
 * @return The next byte in the stream, as a non-negative
 *   integer, or -1 for EOF.
 * @throws IOException An I/O error occurred.
 */
public int read() throws IOException {
    if (closed) {
        throw new FileItemStream.ItemSkippedException();
    }
    if (available() == 0) {
        if (makeAvailable() == 0) {
            return -1;
        }
    }
    ++total;
    int b = buffer[head++];
    if (b >= 0) {
        return b;
    }
    return b + BYTE_POSITIVE_OFFSET;
}
 
开发者ID:actframework,项目名称:actframework,代码行数:23,代码来源:MultipartStream.java

示例4: skip

import org.apache.commons.fileupload.FileItemStream; //导入方法依赖的package包/类
/**
 * Skips the given number of bytes.
 * @param bytes Number of bytes to skip.
 * @return The number of bytes, which have actually been
 *   skipped.
 * @throws IOException An I/O error occurred.
 */
public long skip(long bytes) throws IOException {
    if (closed) {
        throw new FileItemStream.ItemSkippedException();
    }
    int av = available();
    if (av == 0) {
        av = makeAvailable();
        if (av == 0) {
            return 0;
        }
    }
    long res = Math.min(av, bytes);
    head += res;
    return res;
}
 
开发者ID:actframework,项目名称:actframework,代码行数:23,代码来源:MultipartStream.java


注:本文中的org.apache.commons.fileupload.FileItemStream.ItemSkippedException方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。