// Path: src/main/java/com/urbanairship/datacube/CSerializable.java
// public interface CSerializable {
//     byte[] serialize();
// }
// 
// Path: src/main/java/com/urbanairship/datacube/serializables/StringSerializable.java
// public class StringSerializable implements CSerializable {
//     private final String s;
// 
//     public StringSerializable(String s) {
//         this.s = s;
//     }
// 
//     @Override
//     public byte[] serialize() {
//         return staticSerialize(s);
//     }
// 
//     public static byte[] staticSerialize(String s) {
//         try {
//             return s.getBytes("UTF8");
//         } catch (UnsupportedEncodingException e) {
//             // No reasonable JVM will lack UTF8
//             throw new RuntimeException(e);
//         }
//     }
// }


import com.urbanairship.datacube.CSerializable;
import com.urbanairship.datacube.serializables.StringSerializable;
/*
Copyright 2012 Urban Airship and Contributors
*/

package com.urbanairship.datacube.bucketers;


/**
 * You can use this bucketer to avoid writing your own, in the case where:
 * - You have a cube coordinate that's a String
 * - You want the bucketer to pass through the String unchanged as the bucket
 */
public class StringToBytesBucketer extends AbstractIdentityBucketer<String> {
    private static final StringToBytesBucketer instance = new StringToBytesBucketer();

    public static final StringToBytesBucketer getInstance() {
        return instance;
    }

    @Override
// Path: src/main/java/com/urbanairship/datacube/CSerializable.java
// public interface CSerializable {
//     byte[] serialize();
// }
// 
// Path: src/main/java/com/urbanairship/datacube/serializables/StringSerializable.java
// public class StringSerializable implements CSerializable {
//     private final String s;
// 
//     public StringSerializable(String s) {
//         this.s = s;
//     }
// 
//     @Override
//     public byte[] serialize() {
//         return staticSerialize(s);
//     }
// 
//     public static byte[] staticSerialize(String s) {
//         try {
//             return s.getBytes("UTF8");
//         } catch (UnsupportedEncodingException e) {
//             // No reasonable JVM will lack UTF8
//             throw new RuntimeException(e);
//         }
//     }
// }


// Path: src/main/java/com/urbanairship/datacube/bucketers/StringToBytesBucketer.java
import com.urbanairship.datacube.CSerializable;
import com.urbanairship.datacube.serializables.StringSerializable;

/*
Copyright 2012 Urban Airship and Contributors
*/

package com.urbanairship.datacube.bucketers;


/**
 * You can use this bucketer to avoid writing your own, in the case where:
 * - You have a cube coordinate that's a String
 * - You want the bucketer to pass through the String unchanged as the bucket
 */
public class StringToBytesBucketer extends AbstractIdentityBucketer<String> {
    private static final StringToBytesBucketer instance = new StringToBytesBucketer();

    public static final StringToBytesBucketer getInstance() {
        return instance;
    }

    @Override
    public CSerializable makeSerializable(String coord) {