/*
 * Copyright 2013-2017 Spotify AB. All rights reserved.
 *
 * The contents of this file are licensed under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.spotify.ffwd.kafka;

import kafka.serializer.Encoder;
import kafka.utils.VerifiableProperties;

public class IntegerEncoder implements Encoder<Integer> {
    public IntegerEncoder(VerifiableProperties properties) {
    }

    @Override
    public byte[] toBytes(Integer o) {
        final int i = o;
        return new byte[]{
            (byte) (i & 0xff), (byte) ((i << 8) & 0xff), (byte) ((i << 16) & 0xff),
            (byte) ((i << 24) & 0xff)
        };
    }
}

@@ -1,10 +1,54 @@
 /*
+-%0A * -%5C-%5C-%0A * FastForward Kafka Module%0A * --
 %0A * Copy
@@ -57,17 +57,23 @@
 ght 
-2013-2017
+(C) 2016 - 2018
  Spo
@@ -83,68 +83,19 @@
 y AB
-. All rights reserved.%0A *%0A * The contents of this file are l
+%0A * --%0A * L
 icen
@@ -135,19 +135,16 @@
 sion 2.0
-%0A *
  (the %22L
@@ -152,16 +152,19 @@
 cense%22);
+%0A *
  you may
@@ -207,27 +207,24 @@
 nce with the
-%0A *
  License. Yo
@@ -220,16 +220,19 @@
 License.
+%0A *
  You may
@@ -266,19 +266,21 @@
 se at%0A *
+ 
 %0A *
+ 
      htt
@@ -321,16 +321,17 @@
 E-2.0%0A *
+ 
 %0A * Unle
@@ -466,16 +466,19 @@
 SIS,
+%0A *
  WITHOUT
 %0A * 
@@ -473,19 +473,16 @@
  WITHOUT
-%0A *
  WARRANT
@@ -542,16 +542,19 @@
 ied.
+%0A *
  See the
 %0A * 
@@ -549,19 +549,16 @@
  See the
-%0A *
  License
@@ -609,16 +609,19 @@
 ions and
+%0A *
  limitat
@@ -630,19 +630,16 @@
 ns under
-%0A *
  the Lic
@@ -646,17 +646,27 @@
 ense.%0A *
-/
+ -/-/-%0A */%0A
 %0Apackage

update license header