src/main/java/com/amazonaws/kinesisvideo/internal/service/DefaultServiceCallbacksImpl.java [345:375]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    expiration = credentials.getExpiration().getTime() * Time.HUNDREDS_OF_NANOS_IN_A_MILLISECOND;

                    // Serialize the credentials as streaming token
                    final ObjectOutput outputStream = new ObjectOutputStream(byteArrayOutputStream);
                    outputStream.writeObject(credentials);
                    outputStream.flush();
                    serializedCredentials = byteArrayOutputStream.toByteArray();
                    outputStream.close();
                } catch (final IOException e) {
                    log.exception(e);
                } catch (final KinesisVideoException e) {
                    log.exception(e);
                } finally {
                    try {
                        byteArrayOutputStream.close();
                    } catch (final IOException ex) {
                        // Do nothing
                    }
                }

                final int statusCode = HTTP_OK;

                try {
                    kinesisVideoProducer.getStreamingTokenResult(
                            stream,
                            streamHandle,
                            serializedCredentials,
                            expiration,
                            statusCode);
                } catch (final ProducerException e) {
                    throw new RuntimeException(e);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/com/amazonaws/kinesisvideo/java/service/CachedInfoMultiAuthServiceCallbacksImpl.java [167:197]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            expiration = credentials.getExpiration().getTime() * Time.HUNDREDS_OF_NANOS_IN_A_MILLISECOND;

            // Serialize the credentials as streaming token
            final ObjectOutput outputStream = new ObjectOutputStream(byteArrayOutputStream);
            outputStream.writeObject(credentials);
            outputStream.flush();
            serializedCredentials = byteArrayOutputStream.toByteArray();
            outputStream.close();
        } catch (final IOException e) {
            log.exception(e);
        } catch (final KinesisVideoException e) {
            log.exception(e);
        } finally {
            try {
                byteArrayOutputStream.close();
            } catch (final IOException ex) {
                // Do nothing
            }
        }

        final int statusCode = HTTP_OK;

        try {
            kinesisVideoProducer.getStreamingTokenResult(
                    stream,
                    streamHandle,
                    serializedCredentials,
                    expiration,
                    statusCode);
        } catch (final ProducerException e) {
            throw new RuntimeException(e);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



