This method is used by JNI. Do not call or modify.<p>

Allocates a byte buffer for a vertex data channel

@param channelType the channel type
@param channelIndex sub-index, used for types that can have multiple
channels, such as texture coordinates
778230
@SuppressWarnings("unused")
    private void allocateDataChannel(int channelType) {
        switch (channelType) {
            case NORMALS:
                m_normals = ByteBuffer.allocateDirect(
                        m_numVertices * 3 * SIZEOF_FLOAT);
                m_normals.order(ByteOrder.nativeOrder());
                break;
            case TANGENTS:
                m_tangents = ByteBuffer.allocateDirect(
                        m_numVertices * 3 * SIZEOF_FLOAT);
                m_tangents.order(ByteOrder.nativeOrder());
                break;
            default:
                throw new IllegalArgumentException("unsupported channel type");
        }
    }
1004779
function clientNetworkData(channelDefArray, opt) {
	var self = {
		__TYPE__ : MessageType.CS_NET,
		channelCount : new type.UInt32Le( function () {
			return self.channelDefArray.obj.length;
		}),
		channelDefArray : channelDefArray || new type.Factory( function (s) {
			self.channelDefArray = new type.Component([]);
			
			for (var i = 0; i < self.channelCount.value; i++) {
				self.channelDefArray.obj.push(channelDef().read(s));
			}
		})
	};
	
	return new type.Component(self, opt);
}
203228
@Override
  public void setBinaryStream(int parameterIndex, InputStream inputStream) throws SQLException {
     setBinaryStream(parameterIndex, inputStream, Integer.MAX_VALUE);
  }
595752
@Override
    public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
        internalStmt.setBinaryStream(parameterIndex, x);
    }
616937
@Override
	public void setXY(int index, Point2D pt) {
		if (index < 0 || index >= m_pointCount)
			// TODO exception
			throw new IndexOutOfBoundsException();

		_verifyAllStreams();
		// AttributeStreamOfDbl v = (AttributeStreamOfDbl)
		// m_vertexAttributes[0];
		AttributeStreamOfDbl v = (AttributeStreamOfDbl) m_vertexAttributes[0];
		v.write(index * 2, pt);
		notifyModified(DirtyFlags.DirtyCoordinates);
	}
942479
public void setChannels(java.util.Collection<Channel> channels) {
        if (channels == null) {
            this.channels = null;
            return;
        }

        this.channels = new java.util.ArrayList<Channel>(channels);
    }
307258
protected void openChannel(boolean readHeader, boolean readIndex) throws FileLockException, IOException {
        super.openChannel(readHeader);
        calcIndexInformations();
        if (mode == AccessMode.READ_ONLY) {
            indexBuffer = channel.map(FileChannel.MapMode.READ_ONLY, INDEX_OFFSET, indexSizeInBytes);
        } else {
            indexBuffer = channel.map(FileChannel.MapMode.READ_WRITE, INDEX_OFFSET, indexSizeInBytes);
        }

        if (readIndex) {
            readIndex();
        }
    }
1097276
public ChannelBuffer wrap(ByteBuffer buffer) {
        if (buffer == null) {
            throw new NullPointerException("buffer");
        }

        int position = buffer.position();
        int limit = buffer.limit();

        this.order = buffer.order();
        this.buffer = buffer;
        this.capacity = buffer.capacity();
        setIndex(position, limit);
        return this;
    }
658717
protected void determineNextChannel() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "determineNextChannel, vc=" + getVCHash());
        }

        // Pass the buffers up to the application side channel.
        ConnectionReadyCallback linkOnApplicationSide = getApplicationCallback();
        if (linkOnApplicationSide != null) {
            linkOnApplicationSide.ready(getVirtualConnection());
        } else {
            int discriminationResult = Discriminator.YES;
            try {
                // Need to go all the way back to the SSL channel to get the
                // latest disc process in case it has changed.
                discriminationResult = getChannel().getDiscriminationProcess().discriminate(getVirtualConnection(), readInterface.getBuffers(), this);
            } catch (Exception e) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Exception caught doing discriminate, " + e);
                }
                FFDCFilter.processException(e, getClass().getName(), "346", this);
                throw new RuntimeException("Exception caught doing discriminate, " + e);
            }

            switch (discriminationResult) {
                case DiscriminationProcess.SUCCESS: {
                    // Call the next channel, assigned during discrimination.
                    getApplicationCallback().ready(getVirtualConnection());
                    break;
                }
                case DiscriminationProcess.FAILURE: {
                    // No next channel will be called. Therefore, read interface buffers must be freed here.
                    WsByteBuffer[] buffers = getDeviceReadInterface().getBuffers();
                    // clear out the readInterface buffer so that we only close (release) it once
                    for (int i = 0; i < buffers.length; i++) {
                        if (buffers[i] == readInterface.netBuffer) {
                            buffers[i] = null;
                        }
                    }
                    WsByteBufferUtils.releaseBufferArray(buffers);
                    // Close down the vc with an exception
                    close(getVirtualConnection(), new Exception("Failure response from discrimination process."));
                    break;
                }
                case DiscriminationProcess.AGAIN: {
                    // TODO: this doesn't set up for a read...
                    // Need to read more in order to determine next channel. ForceQueue is true.
                    readInterface.setBuffer(readInterface.getBuffer());
                    // The read will be asynchronous so a callback is needed.
                    MoreDataNeededCallback callback = new MoreDataNeededCallback();
                    // No need to save number of bytes read. If problem occurs here, IOException is thrown.
                    // Do the asychronous read. Forcequeue is false, so the callback may not be necessary.
                    if (null != readInterface.read(1, callback, false, TCPRequestContext.USE_CHANNEL_TIMEOUT)) {
                        // Data is ready. The callback will not be called.
                        // Recursively call this method to determine the next channel.
                        determineNextChannel();
                    }
                    break;
                }
                default: {
                    // No next channel will be called. Therefore, read interface buffers must be freed here.
                    WsByteBufferUtils.releaseBufferArray(getDeviceReadInterface().getBuffers());
                    // Close down the vc with an exception
                    close(getVirtualConnection(), new Exception("Unknown response from discrimination process, " + discriminationResult));
                    break;
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "determineNextChannel");
        }
    }
466418
public void doStatus(@Param("pageIndex") int pageIndex, @Param("searchKey") String searchKey,
                         @Param("channelId") Long channelId, @Param("status") String status, Navigator nav)
                                                                                                           throws WebxException {
        String errorType = null;
        if (status.equals("start")) {
            try {
                channelService.startChannel(channelId);
            } catch (ManagerException e) {
                if (e.getCause() instanceof InvalidConfigureException) {
                    errorType = ((InvalidConfigureException) e.getCause()).getType().name();
                }
            } catch (InvalidConfigureException rce) {
                errorType = rce.getType().name();
            }

        } else if (status.equals("stop")) {
            channelService.stopChannel(channelId);
        }

        if (errorType != null) {
            nav.redirectToLocation("channelList.htm?pageIndex=" + pageIndex + "&searchKey=" + urlEncode(searchKey)
                                   + "&errorType=" + errorType);
        } else {
            nav.redirectToLocation("channelList.htm?pageIndex=" + pageIndex + "&searchKey=" + urlEncode(searchKey));
        }
    }
835180
@Override
    public synchronized ChannelData updateChannelProperty(String channelName, Object propertyKey, Object propertyValue) throws ChannelException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "updateChannelProperty");
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "channelName=" + channelName + "propertyKey=" + propertyKey + ", propertyValue=" + propertyValue);
        }
        if (null == channelName) {
            throw new InvalidChannelNameException("Input channel name is null");
        }
        if (null == propertyKey || null == propertyValue) {
            throw new ChannelException("Null property key or value found.");
        }

        // Find the existing channel config
        ChannelDataImpl channelData = (ChannelDataImpl) channelDataMap.get(channelName);
        if (null == channelData) {
            throw new InvalidChannelNameException("Unable to find input channel, " + channelName);
        }

        // Update the property bag. Note this may throw an exception.
        channelData.setProperty(propertyKey, propertyValue);
        // Update each running channel that is using this parent channel data
        // object.
        updateRunningChannels(channelData);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "updateChannelProperty");
        }
        return channelData;
    }
169837
@Benchmark
	@BenchmarkMode(Mode.AverageTime)
	public void byteBufferFileChannel(final Configuration configuration) throws IOException {
		ByteBuffer buffer = ByteBuffer.allocate(BUFFER_CAPACITY);

		try (RandomAccessFile file = new RandomAccessFile(configuration.file, "rw")) {
			try (FileChannel channel = file.getChannel()) {
				for (long i = 0; i < LINES; ++i) {
					if (buffer.remaining() < DATA.length) {
						buffer.flip();
						channel.write(buffer);
						buffer.clear();
					}

					if (buffer.remaining() < DATA.length) {
						file.write(DATA);
					} else {
						buffer.put(DATA);
					}
				}

				if (buffer.position() > 0) {
					buffer.flip();
					channel.write(buffer);
				}
			}
		}
	}
882591
int writePageIndex(byte []buffer,
                     int head,
                     int type,
                     int pid,
                     int nextPid,
                     int entryOffset, 
                     int entryLength)
  {
    int sublen = 1 + 4 * 4;
    
    if (BLOCK_SIZE - 8 < head + sublen) {
      return -1;
    }
    
    buffer[head] = (byte) type;
    head++;
    
    BitsUtil.writeInt(buffer, head, pid);
    head += 4;
    
    BitsUtil.writeInt(buffer, head, nextPid);
    head += 4;
    
    BitsUtil.writeInt(buffer, head, entryOffset);
    head += 4;
    
    BitsUtil.writeInt(buffer, head, entryLength);
    head += 4;
    
    return head;
  }
952137
@Override
    public ChannelBuffer buffer() throws Exception {
        int payloadLen = 0;
        if (_message != null)
            payloadLen = _message.length;

        int totalLen = 8 + payloadLen;
        ChannelBufferOutputStream bout = new ChannelBufferOutputStream(ChannelBuffers.directBuffer(totalLen));
        bout.writeShort(_type);

        if (_task > Short.MAX_VALUE)
            throw new RuntimeException("Task ID should not exceed " + Short.MAX_VALUE);

        bout.writeShort((short) _task);
        bout.writeInt(payloadLen);
        if (payloadLen > 0)
            bout.write(_message);

        bout.close();
        return bout.buffer();
    }
1334537
public void setChannels(java.util.Collection<String> channels) {
        if (channels == null) {
            this.channels = null;
            return;
        }

        this.channels = new java.util.ArrayList<String>(channels);
    }
701917
private ByteBuf allocate(ChannelHandlerContext ctx, int capacity) {
        ByteBufAllocator alloc = ctx.alloc();
        if (engineType.wantsDirectBuffer) {
            return alloc.directBuffer(capacity);
        } else {
            return alloc.buffer(capacity);
        }
    }
745286
private static void fillIndexBuffer(
            ElementReader reader,
            IntBuffer indexBuffer) throws IOException {

        // Just go though the triangles and store the indices in the buffer.
        Element triangle = reader.readElement();
        while (triangle != null) {

            int[] indices = triangle.getIntList("vertex_index");
            for (int index : indices) {
                indexBuffer.put(index);
            }

            triangle = reader.readElement();
        }
    }