本文整理汇总了Java中com.sun.nio.sctp.InvalidStreamException类的典型用法代码示例。如果您正苦于以下问题:Java InvalidStreamException类的具体用法?Java InvalidStreamException怎么用?Java InvalidStreamException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InvalidStreamException类属于com.sun.nio.sctp包,在下文中一共展示了InvalidStreamException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFilter
import com.sun.nio.sctp.InvalidStreamException; //导入依赖的package包/类
@NotNull
public GitFilter getFilter(@NotNull FileMode fileMode, @NotNull GitProperty[] props) {
if (fileMode.getObjectType() != Constants.OBJ_BLOB) {
return gitFilters.get(GitFilterRaw.NAME);
}
if (fileMode == FileMode.SYMLINK) {
return gitFilters.get(GitFilterLink.NAME);
}
for (int i = props.length - 1; i >= 0; --i) {
final String filterName = props[i].getFilterName();
if (filterName != null) {
final GitFilter filter = gitFilters.get(filterName);
if (filter == null) {
throw new InvalidStreamException("Unknown filter requested: " + filterName);
}
return filter;
}
}
return gitFilters.get(GitFilterRaw.NAME);
}
示例2: checkStreamNumber
import com.sun.nio.sctp.InvalidStreamException; //导入依赖的package包/类
private void checkStreamNumber(int streamNumber) {
synchronized (stateLock) {
if (association != null) {
if (streamNumber < 0 ||
streamNumber >= association.maxOutboundStreams())
throw new InvalidStreamException();
}
}
}
示例3: checkStreamNumber
import com.sun.nio.sctp.InvalidStreamException; //导入依赖的package包/类
private void checkStreamNumber(Association assoc, int streamNumber) {
synchronized (stateLock) {
if (streamNumber < 0 || streamNumber >= assoc.maxOutboundStreams())
throw new InvalidStreamException();
}
}